Skip to content

Instantly share code, notes, and snippets.

View hrueger's full-sized avatar
😃

Hannes Rüger hrueger

😃
View GitHub Profile
@gabrielfeitosa
gabrielfeitosa / config.env
Created September 25, 2020 18:55
Blue/Green deployment (Traefik, docker)
ENVIRONMENT=dev
OTHER_CONFIG=BLAH
@daveyijzermans
daveyijzermans / index.js
Created April 28, 2019 11:20
Discover Focusrite Control Server on the network
const PORT = 61392;
const dgram = require('dgram');
const client = dgram.createSocket('udp4');
// Make the discovery message
const msg = '<client-discovery app="SAFFIRE-CONTROL" version="4" device="iOS"/>';
const hex = ('000000' + msg.length.toString(16)).substr(-6);
const announce = 'Length=' + hex + ' ' + msg;
// Start the udp socket
@xola139
xola139 / Invalid Host Header NGROK
Created February 19, 2018 19:17
When Invalid Host Header when ngrok tries to connect to Angular or React dev server
When Invalid Host Header when ngrok tries to connect to Angular or React dev server use this form for run ngrok.
ngrok http 8080 -host-header="localhost:8080"
ngrok http --host-header=rewrite 8080
@KurtJacobson
KurtJacobson / touchscreen_calibration.md
Last active February 27, 2024 22:06
Touchscreen calibration procedue for Debian9 (stretch)

Touchscreen Calibration in Debian9

Unfortunately [xinput-calibrator][1] does not work at all for calibrating a touchscreen in Debian9. This is apparently because X server now uses libinput to handle input devices instead of evdev. I spent huge amount of trying to fiddling with xinput-calibrator and 99-calibration.conf files until I finely found this [issue][2] on GitHub that gave me some hints as how to proceed. This is mostly for my own reference, but I hope it might also help others in the same situation.

@cecilemuller
cecilemuller / mjpeg.js
Last active December 30, 2022 14:35
Emit a looped serie of images as an MJPEG stream using Node.js
'use strict';
const {readFileSync} = require('fs');
const {createServer} = require('http');
const {EventEmitter} = require('events');
let bufferIndex = -1;
const buffers = [
readFileSync('1.jpg'),
readFileSync('2.jpg'),
readFileSync('3.jpg'),
@ramnathv
ramnathv / gh-pages.md
Created March 28, 2012 15:37
Creating a clean gh-pages branch

Creating a clean gh-pages branch

This is the sequence of steps to follow to create a root gh-pages branch. It is based on a question at [SO]

cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" &gt; index.html