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
yeahconsole*toggleKey: Alt+t | |
yeahconsole*consoleHeight: 30 | |
yeahconsole*aniDelay: 1 | |
yeahconsole*restart: 1 | |
yeahconsole*background: black | |
yeahconsole*foreground: white | |
"yeahconsole*font: -*-fixed-medium-r-*-*-15-*-*-*-*-*-iso8859-* | |
xterm*background: black | |
xterm*foreground: white |
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
/* | |
* readfile | |
* | |
* Patrick Pelletier (pp.pelletier@gmail.com) - July 2010 | |
* | |
* Program that reads a file and outputs it's content to stdout. | |
* | |
* Uses a dynamic buffer to store the content temporarly. | |
* It makes a good example of how to allocate a dynamic char buffer. | |
* Was written as an exercice while bored with no internet connection @Recon 2010 |
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
startup_message off | |
nethack on | |
defscrollback 5000 | |
shell -/bin/bash | |
#termcapinfo xterm* 'is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l' | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}%{g}[ %{G}%H %{g}][%= %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][ %{B}%Y-%m-%d %{W}%c %{g}]' |
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
function ajax(url) { | |
try { | |
xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP"); | |
} catch (e) { | |
// browser doesn't support ajax. handle however you want | |
} | |
xmlhttp.onreadystatechange = triggered; | |
xmlhttp.open("GET", url); |
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/awk | |
# Input: "Initial_cash interest_rate number_of_years yearly_deposit" | |
{ | |
initial_amount = $1 | |
interest_rate = $2 | |
number_of_years = $3 | |
yearly_deposit = $4 | |
total = initial_amount | |
current_year = 1 |
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 | |
import subprocess | |
import sys | |
def run(command): | |
if not command: | |
raise Exception("Commande vide") | |
else: | |
print command | |
p = subprocess.Popen(command.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) |
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
function ajax(url, callback) { | |
var x = new XMLHttpRequest(); | |
x.onreadystatechange = function(){ | |
if (x.readyState == 4) { | |
callback(x.responseText); | |
} | |
}; | |
x.open("GET", url); | |
x.send(); | |
} |
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
from timeit import default_timer | |
class Timer(object): | |
def __init__(self, verbose=False): | |
self.verbose = verbose | |
self.timer = default_timer | |
def __enter__(self): | |
self.start = self.timer() |
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 | |
if [ $# -ne 2 ] | |
then | |
echo "Usage: $0 <name> <email>" | |
exit 1 | |
fi | |
git config --global user.name $1 | |
git config --global user.email $2 |
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 | |
import urllib | |
import urllib2 | |
import getpass | |
from xml.dom import minidom | |
class Grua: | |
def __init__(self, username, password): |
OlderNewer