Skip to content

Instantly share code, notes, and snippets.

@gawel
gawel / proxfree.youtube.js
Created November 25, 2012 22:00
Automaticaly use proxfree for youtube
// ==UserScript==
// @name proxfree youtube
// @namespace proxfree
// @include http://www.youtube.com/*
// @include https://www.youtube.com/*
// @include *proxfree*
// @version 1
// ==/UserScript==
//
if (/.*proxfree.*/.exec(window.location.href)) {
@gawel
gawel / backup.py
Last active November 24, 2018 14:13
from chut import * # noqa
@console_script(fmt='msg')
def backup(args):
"""
Usage: %prog [options] sync [<server>...]
%prog add <target>
%prog list

Parlement Virtuel

Concept

Créer un parlement virtuel pour avoir un contre pouvoir virtuel. L'idée est d'avoir le point de vue des citoyens sur les lois votées dans une assemblée et de le comparer au votes éfectués à l'assemblée réel.

#!/bin/bash
if ! [ -e seahub.sh ]; then
echo "This script must be run in the directory of the seahub.sh script"
exit 1
fi
function check_python_executable () {
if [[ "$PYTHON" != "" && -x $PYTHON ]]; then
return 0
@gawel
gawel / about_profiling.rst
Last active December 22, 2015 23:49
Profiling middleware. Log wallclock, utime, stime and idle time.

Profiling

This gist contain a set of modules to help you to profile your application

@gawel
gawel / README.rst
Last active December 27, 2015 05:19

Usage:

$ git clone https://gist.github.com/7273196.git pypy-benches
$ cd pypy-benches
$ python2.7 bootstrap.py
$ bin/buildout

zope.interface bench:

$ python2.7 bin/zope-interface
@gawel
gawel / 11link2sd
Last active December 29, 2015 00:09
#!/system/bin/sh
if [ -f adb ]; then
./adb push 11link2sd /system/etc/init.d/11link2sd
./adb shell chown root:shell /system/etc/init.d/11link2sd
./adb shell chmod +x /system/etc/init.d/11link2sd
exit
fi
LOG=/data/link2sd-11link2sd.log
s3ql-*
pyenv
# -*- coding: utf-8 -*-
from chut import gpg
from chut import * # noqa
from getpass import getpass
from hashlib import sha1
import pexpect
def get_password():