Skip to content

Instantly share code, notes, and snippets.

View henkman's full-sized avatar
🌶️

henkman henkman

🌶️
View GitHub Profile
#NoTrayIcon
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Icon=spotify.ico
#AutoIt3Wrapper_Outfile=MPCHotkey.exe
#AutoIt3Wrapper_Res_requestedExecutionLevel=asInvoker
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
Const $MPC_EXE = "mpc-hc.exe"
Const $DEFAULT_HOTKEYS[5][2] = [ _
[4, 0], _
["PlayPause", "!e"], _
@henkman
henkman / DuckType.java
Last active August 29, 2015 14:26
java ducktype class
/*
class Duck {
public void quack() { System.out.println("quack"); }
}
interface Quacker {
public void quack();
}
{
@henkman
henkman / imageslider.js
Created September 16, 2015 15:38
Imageslider with smooth transition (no dependency)
function newSlider(document, window) {
function start($slider, images, currentImage, interval, fadeInDuration) {
var currentBuffer = 0;
var $buffers = [
document.createElement("img"),
document.createElement("img")
];
for(var i=0; i<$buffers.length; i++) {
$buffers[i].src = images[currentImage];
$buffers[i].style.position = "absolute";
import requests
import re
import os
pages = (
'http://www.radioeins.de/programm/sendungen/modo1619/zwiegespraeche_mit/index.htm/page=0.html',
'http://www.radioeins.de/programm/sendungen/modo1619/zwiegespraeche_mit/index.htm/page=1.html',
'http://www.radioeins.de/programm/sendungen/modo1619/zwiegespraeche_mit/index.htm/page=2.html',
'http://www.radioeins.de/programm/sendungen/modo1619/zwiegespraeche_mit/index.htm/page=3.html',
'http://www.radioeins.de/programm/sendungen/modo1619/zwiegespraeche_mit/index.htm/page=4.html',
package main
import (
"encoding/json"
"errors"
"flag"
"fmt"
"io"
"math/rand"
"net/http"
@henkman
henkman / rpatool.py
Last active May 15, 2025 14:34
python 3 rpatool
#!/usr/bin/env python3
import sys
import os
import pickle
import errno
import random
import codecs
class RenPyArchive:
import string
import sys
import re
if __name__ == "__main__":
args = sys.argv[1:]
decode = len(args) >= 2 and "d" == args[0]
if decode:
reDec = re.compile("(\d+)\*([^\d\*]*)")
for s in args[1:]:
@henkman
henkman / youtube_embedded.js
Last active January 15, 2016 12:46
youtube embedded fuckery
function Queue() {
var queue = [];
var offset = 0;
this.enqueue = function(item) {
queue.push(item);
};
this.dequeue = function() {
if (queue.length == 0) return undefined;
var item = queue[offset];
if (++ offset * 2 >= queue.length){
@henkman
henkman / Factorio.CT
Created March 26, 2016 20:25
factorio items + quickbar cheat engine table to change quantity and type
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="19">
<CheatEntries>
<CheatEntry>
<ID>56</ID>
<Description>"Items (change this to the address of first item)"</Description>
<LastState Value="" RealAddress="00000000"/>
<ShowAsHex>1</ShowAsHex>
<VariableType>Array of byte</VariableType>
<ByteLength>0</ByteLength>
@henkman
henkman / upchromium.go
Last active July 20, 2016 10:18
small util to update chromium.exe to latest snapshot version
package main
import (
"archive/zip"
"encoding/json"
"errors"
"flag"
"fmt"
"io"
"log"