Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am gvangool on github.
  • I am gert (https://keybase.io/gert) on keybase.
  • I have a public key whose fingerprint is BE2E D5BD 66A4 931A 249B 9761 A447 33E6 60A0 2170

To claim this, I am signing this object:

@gvangool
gvangool / tasks.py
Last active December 31, 2018 14:21
Photo booth file renamer
"""Tasks to fixup the output of the Area3001 photobooth.
This requires python3.6+ and invoke>=1.2
"""
from datetime import datetime, timedelta
from invoke import task
@task(help={"diff": "Difference in seconds for correction of the timings",
@gvangool
gvangool / ublock.dynamic-rule.txt
Last active August 8, 2018 13:33
uBlock Dynamic Rules
# Block facebook
* facebook.com * block
* facebook.net * block
* fbcdn.net * block
* instagram.com * block
# Enable instagram's images
instagram.com fbcdn.net * allow
instagram.com instagram.com * noop
# Facebook 1st party unblocking
#www.facebook.com facebook.com * allow
@gvangool
gvangool / sierpinski-triangle-svg.elm
Last active November 23, 2017 09:00
Generates an SVG Sierpinski triangle in ELM, demo: http://codepen.io/gvangool/full/vGGzjb/
import Svg exposing (Svg, svg, g, use, defs)
import Svg.Attributes exposing (..)
import Html
triangle_path = "M0 0,2 0,1 1.732 z"
matrix1 = "matrix(0.5 0 0 0.5 0 0)"
matrix2 = "matrix(0.5 0 0 0.5 1 0)"
matrix3 = "matrix(0.5 0 0 0.5 0.5 0.866)"
getLevels : Int -> List (Svg n)
@gvangool
gvangool / openssh6.8-u2f.diff
Created May 8, 2015 12:35
OpenSSH 6.8 patch for libu2f-host
diff --git a/Makefile.in b/Makefile.in
index 40cc7aa..fc24942 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -106,6 +106,7 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
auth2-none.o auth2-passwd.o auth2-pubkey.o \
monitor_mm.o monitor.o monitor_wrap.o auth-krb5.o \
auth2-gss.o gss-serv.o gss-serv-krb5.o \
+ auth-u2f.o \
loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \
@gvangool
gvangool / patch-for-u2f.diff
Last active August 29, 2015 14:20
OpenSSH 6.7 patch for u2f
diff --git a/Makefile.in b/Makefile.in
index 06be3d5..4ae423c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -101,6 +101,7 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
auth2-none.o auth2-passwd.o auth2-pubkey.o \
monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o kexecdhs.o \
kexc25519s.o auth-krb5.o \
+ auth-u2f.o \
auth2-gss.o gss-serv.o gss-serv-krb5.o \
@gvangool
gvangool / nodejs.sh
Created August 11, 2014 14:07
node.js on CentOS 6
yum install gcc-c++ -y
cd /usr/src
wget http://nodejs.org/dist/v0.10.2/node-v0.10.2.tar.gz
tar xf node-v0.10.2.tar.gz
cd node-v0.10.2
./configure && make && make install
@gvangool
gvangool / install_pam_yubico.sh
Created October 8, 2013 07:59
Install the Yubikey PAM modules
yum install git -y
yum install gcc {auto,}make autoconf libtool -y
yum install {,lib}curl {lib{curl,usb},pam}-devel -y
cd /usr/src
git clone git://github.com/Yubico/yubico-pam.git
git clone git://github.com/Yubico/yubico-c.git
git clone git://github.com/Yubico/yubico-c-client.git
git clone git://github.com/Yubico/yubikey-personalization.git
cd /usr/src/yubico-c
autoreconf --install && ./configure && make && make install
@gvangool
gvangool / package.json
Last active December 11, 2015 10:19
Test program for a bug in mikeal/stoopid
{
"name": "bug-stoopid-test",
"description": "Test program for a bug in mikeal/stoopid",
"author": "Gert Van Gool <gert@weepee.org>",
"version": "0.0.1",
"dependencies": {
"cradle": "0.6.4",
"stoopid": "~0.2.1"
},
"engine": "node >= 0.8.0"
@gvangool
gvangool / gist:4110553
Created November 19, 2012 13:10
Cavallo test
>>> from cavallo.course.models import Course
>>> from django.db.models import Count
>>> from cavallo.event.models import Event
>>> event = Event.objects.all()[0]
>>> event
<Event: Manege Bosscherhof - Indoor Jumping>
>>> Course.objects.filter(event=event).annotate(count_combinations=Count('combination'))
[<Course: Clearround pony's en paarden 60 cm (Manege Bosscherhof - Indoor Jumping)>, <Course: Clearround pony's en paarden 80 cm (Manege Bosscherhof - Indoor Jumping)>, <Course: Pony's 80 cm (Manege Bosscherhof - Indoor Jumping)>, <Course: Pony's 90 cm (Manege Bosscherhof - Indoor Jumping)>, <Course: Pony's 100 cm (Manege Bosscherhof - Indoor Jumping)>, <Course: Reeks A 90 cm (Manege Bosscherhof - Indoor Jumping)>, <Course: Reeks B 100 cm (Manege Bosscherhof - Indoor Jumping)>, <Course: Serie 1 110 cm (Manege Bosscherhof - Indoor Jumping)>, <Course: Top Score 100 cm (Manege Bosscherhof - Indoor Jumping)>]
>>> Course.objects.filter(event=event).annotate(count_combinations=Count('combination__deleted'))
[<Cours