Skip to content

Instantly share code, notes, and snippets.

View henkman's full-sized avatar
🌶️

henkman henkman

🌶️
View GitHub Profile
package main
import (
"github.com/AllenDang/w32"
"io"
"os"
"unsafe"
"errors"
"fmt"
"syscall"
@henkman
henkman / autorun.au3
Created July 13, 2012 22:07
Script to enable autorun for Dayz
; Autorun script for dayz
; Press HOME key once to start running
; Press END key to stop running
#include <Misc.au3>
Const $startRunning = "24"
Const $stopRunning = "23"
Local $user32 = DllOpen("user32.dll")
@henkman
henkman / SpotifyHotkey.au3
Last active August 1, 2017 13:05
SpotifyHotkey - AutoIt
#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=spotify.ico
#AutoIt3Wrapper_Outfile=SpotifyHotkey.exe
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#cs
SpotifyHotkey - Adds global Hotkeys to Spotify
Just start the SpotifyHotkey.exe, if spotify is not running it will be started.
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
static char *ALPHABET = "abcdefghijklmnopqrstuvwxyz";
static void rotate(char **string, int r)
{
char *s = *string;
int i, c;
from livestreamer.exceptions import PluginError, NoStreamsError
from livestreamer.plugin import Plugin
from livestreamer.stream import RTMPStream
from livestreamer.plugin.api import http
import re
class CastAMP(Plugin):
_reChannel = re.compile("live/([^$]+)$")
from itertools import izip
import string
class Atbash:
def __construct(self):
self.atbash_abc = zip(string.ascii_lowercase, string.ascii_lowercase[::-1])
self.atbash_abc_enc = {p[1]:p[0] for p in atbash_abc}
self.atbash_abc_dec = {p[0]:p[1] for p in atbash_abc}
def enc(self, s):
return "".join([atbash_abc_enc[c] if c in atbash_abc_enc else c for c in s.lower()])
@henkman
henkman / instructions.txt
Last active December 31, 2023 01:54
3301 wisdom
Command your own self.
Do four unreasonable things each day.
Program your mind. Program reality
Question all things. Discover truth inside yourself.
Follow your truth. Impose nothing on others.
You are a being unto yourself. Your are a law unto yourself.
/*
gcc -s -O3 -Wall -o bitaudio bitaudio.c -lportaudio
*/
#include <portaudio.h>
#include <signal.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
static PaStream *stream;
package main
import (
"bufio"
"flag"
"fmt"
"net"
"os"
"regexp"
"strconv"
def decode(text):
reps = {" ":"0", "\t":"1"}
s = [
y for y in
"".join(
[reps[x] if x in reps else x for x in text]
).split("\n")
if len(y)>0
]
return "\n".join(