Skip to content

Instantly share code, notes, and snippets.

View JanKoppe's full-sized avatar
🐧
NOOT NOOT!

Jan Koppe JanKoppe

🐧
NOOT NOOT!
View GitHub Profile
@plepe
plepe / gist:52ecc9f18efb32c68d18
Last active July 13, 2025 12:58
MDADM and LVM cheat sheet

mdadm

Glossary:

  • md: multiple devices
command description
cat /proc/mdstat show status of all raids
mdadm --detail /dev/md0 detailed status of raid md0
@kamiyaowl
kamiyaowl / dmx_receiver.c
Last active January 25, 2019 09:13
dmx receive for avr
/*
* dmx_receiver.c
*
* Created: 2014/07/15 19:43:52
* Author: kamiya
*/
#include <avr/io.h>
#include <avr/interrupt.h>
#include "dmx_receiver.h"
@sivel
sivel / better-ssh-authorized-keys-management.md
Last active April 10, 2025 03:40
Better SSH Authorized Keys Management

Better SSH Authorized Keys Management

A seemingly common problem that people encounter is how to handle all of your users authorized_keys file.

People struggle over management, ensuring that users only have specific keys in the authorized_keys file or even a method for expiring keys. A centralized key management system could help provide all of this functionality with a little scripting.

One piece of functionality overlooked in OpenSSH is the AuthorizedKeysCommand configuration keyword. This configuration allows you to specify a command that will run during login to retrieve a users public key file from a remote source and perform validation just as if the authorized_keys file was local.

Here is an example directory structure for a set of users with SSH public keys that can be shared out via a web server:

@raine
raine / gitter-weechat-instructions.md
Last active October 4, 2021 10:52
Connecting to gitter using weechat

Auth and copy token at https://irc.gitter.im/.

Ignore the /PASS thing, it doesn't work in weechat.

/server add gitter irc.gitter.im -ssl -ssl_verify -ssl_dhkey_size=1024 -password=<REPLACE_WITH_YOUR_TOKEN>
/connect gitter
@robgaunt
robgaunt / gist:bd8674153d3e583ce9a2
Last active January 7, 2025 12:13
ffmpeg a/v sync test video
# Rate in frames per second.
RATE=30
# Duration in seconds.
DURATION=300
# Video size options: https://www.ffmpeg.org/ffmpeg-utils.html#Video-size
SIZE=hd1080
OUTFILE=avsync_${SIZE}_${RATE}fps_${DURATION}s.webm
~/bin/ffmpeg -f lavfi -i "sine=frequency=1:beep_factor=800:duration=${DURATION}" \
-f lavfi -i "testsrc=duration=${DURATION}:size=${SIZE}:rate=${RATE}" \
@sim642
sim642 / DI.m3u
Created July 5, 2015 12:52
Digitally Imported premium streams
#EXTM3U
#EXTINF:-1,Digitally Imported - Ambient
http://pub1.diforfree.org:8000/di_ambient_hi
#EXTINF:-1,Digitally Imported - Big Room House
http://pub1.diforfree.org:8000/di_bigroomhouse_hi
#EXTINF:-1,Digitally Imported - Breaks
http://pub1.diforfree.org:8000/di_breaks_hi
@goodjob1114
goodjob1114 / howToModifyOvaFile.md
Last active July 3, 2025 22:01
how to modify .ova file on linux/Mac using terminal....export vm (OVF 1.0) from virtualbox, then modify some tag and hash value for import vm to ESXi

extract ova files from an archive

$ tar -xvf vmName.ova

modify ovf for some invalid tag

$ vi vmName.ovf
@sivel
sivel / inventory2json.py
Last active December 19, 2023 01:54
Ansible inventory to dynamic inventory JSON output, accepts all inventory input formats
import sys
import json
from ansible.parsing.dataloader import DataLoader
try:
from ansible.inventory.manager import InventoryManager
A24 = True
except ImportError:
from ansible.vars import VariableManager
@rauchg
rauchg / README.md
Last active April 13, 2025 04:29
require-from-twitter
anonymous
anonymous / IRC client in pure bash 4
Created March 28, 2016 16:57
IRC client written in pure bash using only bash builtin commands and no other binaries.
#!/bin/bash
#no PATH, no way to accidently run any programs
PATH=''
#useful variables
term_height=0
term_width=0
term_scroll_height=0
status_line_row=0