Skip to content

Instantly share code, notes, and snippets.

View gvangool's full-sized avatar

Gert Van Gool gvangool

View GitHub Profile
.PHONY: me him her yourself a sandwich all
me:
@echo -n '';
him:
@echo -n '';
her:
@echo -n '';
@gvangool
gvangool / test.py
Created December 12, 2011 09:07
Updated Mobile Vikings msisdn_list API
import requests
r = requests.get('http://localhost:8000/api/2.0/basic/msisdn_list.json?alias=1', auth=('test', 'test'))
print r.content
## OUT
#[
# {
# "msisdn": "+32470046092",
# "alias": "Test Jumbo"
# },
# {
@gvangool
gvangool / 00-README.rst
Last active October 2, 2015 13:28
Endian fix on 64bit OS X

Fixing Endian VPN Client on OSX

Note

assumes Endian VPN and Tunnelblick are installed

  1. Download the file fix-endian-vpn.sh into ~/bin

  2. Mark it as executable chmod +x ~/bin/fix-endian-vpn.sh

  3. Every time you reboot, you must run the script: sudo ~/bin/fix-endian-vpn.sh

    Alternatively, you could add it to the crontab of the root user:

@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
@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 <[email protected]>",
"version": "0.0.1",
"dependencies": {
"cradle": "0.6.4",
"stoopid": "~0.2.1"
},
"engine": "node >= 0.8.0"
@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 / 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 / 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 / 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 / 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)