Skip to content

Instantly share code, notes, and snippets.

View ThomasLeister's full-sized avatar

Thomas Leister ThomasLeister

View GitHub Profile
@HarlemSquirrel
HarlemSquirrel / pulseaudio-dlna.service
Last active September 20, 2023 22:03
a pulseaudio-dlna Unit file for systemd
## Systemd user unit file for pulseaudio-dlna
# Copy to: ~/.config/systemd/user/pulseaudio-dlna.service
# Enable: systemctl --user enable pulseaudio-dlna
[Unit]
Description=PulseAudio-DLNA Service
[Install]
WantedBy=default.target
@chrisdone
chrisdone / gist:02e165a0004be33734ac2334f215380e
Last active October 4, 2024 00:07
Build and run minimal Linux / Busybox systems in Qemu

Common

export OPT=/opt
export BUILDS=/some/where/mini_linux
mkdir -p $BUILDS

Linux kernel

@jkoan
jkoan / NOTE
Last active October 26, 2015 07:09
Gravatar Proxy
A very basic gravatar privacy proxy
This is only very basic!!!
TODO:
- Cache
- GET validation
Install
- Put the script in the webserver directory
@daringer
daringer / Makefile
Last active August 29, 2015 14:01 — forked from felipec/asus_fan.c
OLD/DEPRECATED/OBSOLETE/DONOTUSE: ASUS Fan control linux kernel module - NOW HERE: https://github.com/daringer/asus-fan
obj-m := asus_fan.o
KDIR := /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
all:
$(MAKE) -C $(KDIR) M=$(PWD) modules
install:
# just copy the .ko file anywhere below:
# /lib/modules/$(uname -r)/
@plentz
plentz / nginx.conf
Last active November 14, 2024 08:35
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@andelf
andelf / sighup.go
Created June 29, 2013 05:25
golang process SIGHUP, HUP signal to reload configuration
// program
package main
import "os/signal"
import "os"
import "fmt"
import "syscall"
import "time"
char** explode(char delimiter, char* str) {
int l = strlen(str), i=0, j=0, k=0;
char x = NULL;
char** r = (char**)realloc(r, sizeof(char**));
r[0] = (char*)malloc(l*sizeof(char));
while (i<l+1) {
x = str[i++];
if (x==delimiter || x=='\0') {
r[j][k] = '\0';
r[j] = (char*)realloc(r[j], k*sizeof(char));
#!/usr/bin/perl -w
# 2/2000 krischan at jodies.cx
#
# 0.14 Release
# 0.14.1 Allow netmasks given as dotted quads
# 0.15 Colorize Classbits, Mark new bits in network
# 0.16 25.9.2000 Accept <addr>/<cidr> as first argument
# Print <pre> tag in the script
# 0.17 Bugfix