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
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
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
import time | |
def tailf(filename): | |
f = open(filename, 'r') | |
f.seek(0,2) | |
while True: | |
line = f.readline() | |
if not line: | |
time.sleep(0.1) | |
continue |
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 cgi | |
import subprocess | |
import cgitb | |
cgitb.enable() | |
def run(command): | |
if not command: |
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 | |
# genpass.py | |
# Random password generation | |
# author: Patrick Pelletier | |
import md5 | |
import random | |
def genpass(len=20): | |
''' generates a random password based on the md5 of a random float ''' |
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(); | |
} |
OlderNewer