Skip to content

Instantly share code, notes, and snippets.

Leon Bogaert LeonB

Block or report user

Report or block LeonB

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
# Tested with ffmpeg 2.8.4
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]; then
echo "Please provide audio file, video file and output file"
echo "For example: audio.mp3 video.mp4 output.mp4"
View pre-commit
# An example hook script to verify what is about to be committed.
# Called by git-commit with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
# To enable this hook, make this file executable.
# This is slightly modified from Andrew Morton's Perfect Patch.
View getshm.go
package main
import (
LeonB /
Last active Aug 29, 2015
irsdk_broadcastMsg test

Compile with i686-w64-mingw32-g++ -static-libgcc -static test.cpp
Run with /opt/iracing/bin/wine --bottle default a.exe

LeonB /
Last active Aug 29, 2015
python wrapperscript for stdin bug winegcc
#!/usr/bin/env python
from subprocess import Popen, PIPE, STDOUT
import os
import sys
import tempfile
import re
if not sys.stdin.isatty():
stdin =
LeonB / ruby-2.0.0-p451-readline.patch
Last active May 12, 2016
ruby 2.0.0-p451 readline patch
View ruby-2.0.0-p451-readline.patch
diff --git ext/readline/extconf.rb ext/readline/extconf.rb
index 4920137..8e81253 100644
--- ext/readline/extconf.rb
+++ ext/readline/extconf.rb
@@ -19,6 +19,10 @@ def readline.have_func(func)
return super(func, headers)
+def readline.have_type(type)
+ return super(type, headers)
LeonB /
Created Jul 30, 2012
One-line bash http server
:;while [ $? -eq 0 ];do nc -vlp 8080 -c'(r=read;e=echo;$r a b c;z=$r;while [ ${#z} -gt 2 ];do $r z;done;f=`$e $b|sed 's/[^a-z0-9_.-]//gi'`;h="HTTP/1.0";o="$h 200 OK\r\n";c="Content";if [ -z $f ];then($e $o;ls|(while $r n;do if [ -f "$n" ]; then $e "<a href=\"/$n\">`ls -gh $n`</a><br>";fi;done););elif [ -f $f ];then $e "$o$c-Type: `file -ib $f`\n$c-Length: `stat -c%s $f`";$e;cat $f;else $e -e "$h 404 Not Found\n\n404\n";fi)';done
You can’t perform that action at this time.