Skip to content

Instantly share code, notes, and snippets.

#include "stdafx.h"
#include <sensorsapi.h>
#include <sensors.h>
#pragma comment(lib,"sensorsapi.lib")
int main()
{
ISensorManager* sensorManager = 0;
HRESULT hr = 0;
@romainl
romainl / grep.md
Last active April 18, 2024 01:59
Instant grep + quickfix

FOREWORDS

I don't mean the snippet at the bottom of this gist to be a generic plug-n-play solution to your search needs. It is very likely to not work for you or even break things, and it certainly is not as extensively tested and genericised as your regular third-party plugin.

My goal, here and in most of my posts, is to show how Vim's features can be leveraged to build your own high-level, low-maintenance, workflows without systematically jumping on the plugins bandwagon or twisting Vim's arm.


Instant grep + quickfix

@abdennour
abdennour / README.md
Last active April 18, 2024 01:58
Nginx Reverse Proxy for Nexus Docker Registries

Overview

This is a solution of a common problem with Nexus Docker repositories. The administrator has to expose port for "pull", another port for "push", other ports for each hosted repository. This solution is about leveraging Nginx reverse proxy to avoid using these ports.

How it works ?

Given :

  • Nexus hostname is "nexus.example.com"
  • Nexus web port is 8081
@mohayonao
mohayonao / morse-code.json
Created July 14, 2014 06:18
morse-code.json
{
"0": "-----",
"1": ".----",
"2": "..---",
"3": "...--",
"4": "....-",
"5": ".....",
"6": "-....",
"7": "--...",
"8": "---..",
@arainho
arainho / mdm_check.sh
Last active April 18, 2024 01:49
Check whether DEP is present and MDM enrollment is user-approved.
#!/usr/bin/env bash
# Check if a machine was enrolled via DEP (10.13+)
# Show whether a machine has a device enrollment profile (DEP) present (10.13.0+),
# and if the MDM enrollment is user approved (10.13.4+)
/usr/bin/profiles status -type enrollment
# Checking for a DEP profile on macOS
# Display the DEP profile for a macOS device in 10.13 and above:
sudo /usr/bin/profiles show -type enrollment
@likamrat
likamrat / WinGet_WinSrv.ps1
Created February 13, 2023 00:41
Installing Winget om Windows Server 2019/2022
Write-Information "This script needs be run on Windows Server 2019 or 2022"
If ($PSVersionTable.PSVersion.Major -ge 7){ Write-Error "This script needs be run by version of PowerShell prior to 7.0" }
# Define environment variables
$downloadDir = "C:\WinGet"
$gitRepo = "microsoft/winget-cli"
$msiFilenamePattern = "*.msixbundle"
$licenseFilenamePattern = "*.xml"
$releasesUri = "https://api.github.com/repos/$gitRepo/releases/latest"
@joelonsql
joelonsql / PostgreSQL-EXTENSIONs.md
Last active April 18, 2024 01:45
1000+ PostgreSQL EXTENSIONs

🗺🐘 1000+ PostgreSQL EXTENSIONs

This is a list of URLs to PostgreSQL EXTENSION repos, listed in alphabetical order of parent repo, with active forks listed under each parent.

⭐️ >= 10 stars
⭐️⭐️ >= 100 stars
⭐️⭐️⭐️ >= 1000 stars
Numbers of stars might not be up-to-date.

@reasonableperson
reasonableperson / whisper-stream.sh
Last active April 18, 2024 01:44
generate running transcript for web streams
#!/bin/bash
# whisper-stream.sh
#
# Take a url supported by yt-dlp, dump 30-second segments to the current
# directory named by unix timestamp, and transcribe each segment using Whisper.
#
# example: TZ=Australia/Canberra ./whisper-stream.sh "https://..."
#
# The time displayed is the time when ffmpeg first opens the segment for
@Siss3l
Siss3l / 0424.md
Last active April 18, 2024 01:43
Intigriti's April 2024 Web Challenge thanks to @kiredevsandhacks

Intigriti April Challenge

  • Category: Web
  • Impact: Medium
  • Solves: 12

Challenge

Description

@alpteo
alpteo / semantic-commit-messages-with-emojis.md
Last active April 18, 2024 01:42
Semantic Commit Messages with Emojis

Semantic Commit Messages with Emojis

Commit format: <emoji_type> <commit_type>(<scope>): <subject>. <issue_reference>

Example

:sparkles: feat(Component): Add a new feature. Closes: #
^--------^ ^--^ ^-------^   ^---------------^  ^------^
|          |    |           |                  |
| | | | +--&gt; (Optional) Issue reference: if the commit closes or fixes an issue