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 | |
# Because I was unable to find the root of the Fibbonachi sequence post | |
# chain in the original story comments (it was nowhere to be found!) I made | |
# this little hacky script to go back, post by post, until it reache a post | |
# with no parent. For fun, it displays the users and values as it goes. | |
# The value isn't always accurate, but that doesn't really matter. | |
# The result of this (which didn't take very long) it stopped, not very | |
# far back, because someone deleted a post. Huh. Irritating. | |
# http://www.reddit.com/comments/2mg72/vote_up_if_you_love_pie/c02bfe6 |
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 | |
from string import Template | |
t = 45 | |
s = "test" | |
print Template("We have $t ${s}s.").substitute(locals()) |
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 sys, os | |
import time | |
try: | |
import urllib2 as urllib # Python 2.5 | |
except ImportError: | |
import urllib.request as urllib # Python 3.0 | |
def main(): |
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 | |
from __future__ import division, with_statement | |
import sys, os | |
import subprocess | |
# This is a horrible little script written by someone who doesn't understand | |
# how to use tcpdumbp or subprocess well. It intends to display an allert | |
# whenever specified keywords (such as a password) are seen in network | |
# traffic. Along with the warning it sends 3 \x07 beeps to stdout, in case |
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 sbclx | |
; I actually might want to use a function? Goodie! | |
(defun isPrime (n) ; a crude brute-force prime check | |
(do | |
( | |
(limit (ceiling (sqrt n))) ; maximum requred to determine if it is prime | |
(i 2 (1+ i)) | |
) | |
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 demjson | |
from pprint import pprint | |
import urllib2 | |
def main(): | |
user = "jeremybanks" | |
userJSON = urllib2.urlopen("http://github.com/api/v1/json/%s/" % user).read() | |
user = demjson.decode(userJSON)["user"] |
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
git # master $ git tag -v v0.99.1 | |
object 78d9d414123ad6f4f522ffecbcd9e4a7562948fd | |
type commit | |
tag v0.99.1 | |
tagger Linus Torvalds <[email protected]> 1121468952 -0700 | |
The snail-paced race towards 1.0 is on! | |
gpg: Signature made Fri 15 Jul 19:09:53 2005 EDT using DSA key ID 76E21CBB | |
gpg: Can't check signature: public key not found | |
error: could not verify the tag 'v0.99.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
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td,iframe { | |
margin:0; | |
padding:0; | |
} | |
table { border-collapse:collapse; } | |
fieldset,img { border:0; } | |
address,caption,cite,code,dfn,em,strong,th,var { font-style:normal; font-weight:normal; } |
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
# It's just a basic ./configure; make; sudo make install. | |
curl -O http://ftp.gnu.org/gnu/wget/wget-latest.tar.gz # Irony? | |
tar xzf wget-latest.tar.gz | |
cd wget-*/ | |
./configure | |
make | |
sudo make install |
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 | |
from __future__ import division, with_statement | |
import sys, os | |
class StrictPerson(object): | |
__slots__ = ["first", "last", "age"] | |
def __str__(self): | |
return "%s %s (%s)" % (self.first, self.last, self.age) |
OlderNewer