This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# file .git/hooks/pre-commit | |
exec < /dev/tty | |
read -p "Did you run the tests? [yN]: " yn | |
case $yn in | |
[Yy]* ) echo "Ok, your good to go";; | |
* ) echo "What are you waiting for then?" && exit 1;; | |
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
""" | |
String to Brainfuck. | |
Converts a string to a brainfuck code that prints that string. | |
Author: j0hn <j0hn.com.ar@gmail.com> | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
""" | |
j0hn's hamster buto. | |
Math bitches (?) | |
""" | |
import gtk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
import gtk | |
class LoginWindow(gtk.Window): | |
def __init__(self): | |
gtk.Window.__init__(self) | |
self.connect("destroy", gtk.main_quit) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Bash script to transform a long cwd path to a short path | |
# that shows the first 2 folders, and the last 2 folders | |
# | |
# For example: | |
# /media/Datos/j0hn/Code/py/guicavane/guicavane/Downloaders | |
# Will be transformed to: | |
# /media/Datos/.../guicavane/Downloaders |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*********************************************************************** | |
* KernelRoll, LD_PRELOAD version. * | |
* =============================== * | |
* * | |
* Compile with: gcc -o kernelroll.so kernelroll.c -shared -fPIC -ldl * | |
* Run with: LD_PRELOAD=./kernelroll.so some_file.mp3 * | |
* * | |
* Remember to change SONG constant in this file * | |
* * | |
* Authors: Roger Duran * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
""" | |
Checkout queue test, a test between two models of queues on supermarkets | |
and banks and stuff like that. | |
The two models tested are: | |
Independent checkouts Single queue |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
IMGPATH="/tmp/$(date +%s)_imgur.png" | |
if [ "$1" = "window" ]; then | |
scrot --focused "$IMGPATH" | |
else | |
scrot "$IMGPATH" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
""" | |
Shows how to add a method to a instance of an object. | |
""" | |
class Useless: | |
""" | |
Does nothing, unless you hack it. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
import os | |
import sys | |
import fcntl | |
import struct | |
import termios | |
import threading | |
from time import sleep |