Skip to content

Instantly share code, notes, and snippets.

View gelendir's full-sized avatar

Gregory Eric Sanderson gelendir

View GitHub Profile
@gelendir
gelendir / beer.lol
Created May 22, 2011 00:49
simple implementation of 99 bottles of beer song in LOLCODE
HAI 1.2
HOW DUZ I HOLLAR YR LOLZ
VISIBLE LOLZ
IF U SAY SO
HOW DUZ I SING YR BEER
HOLLAR SMOOSH "I CAN HAZ " AN BEER AN " BOTLEZ O BEER ON TEH WAL !1!!ONE!!"
IF U SAY SO
HOW DUZ I SING_MOAR YR BEER
BEER R DIFF OF BEER AN 1
HOLLAR SMOOSH "TAEK ONE DAOWN AN PASS ITZ ARAOUND " AN BEER AN " BOTLEZ ON TEH WAL !!1!!!1!"
@gelendir
gelendir / xdcc_search.py
Created December 16, 2010 17:43
Query XDCC Parser server for packs
#!/usr/bin/python2
"""
XDCC package list retriever
Ugly quick hack by Gregory Eric Sanderson Turcot Temlett MacDonnell Forbes
Sends a search request to a XDCC Parser server (http://xdccparser.is-fabulo.us) and returns a list of packs.
Requires python2.6 and python-spidermonkey (http://github.com/davisp/python-spidermonkey)
"""
import sys, urllib, spidermonkey, json
@gelendir
gelendir / expire_notify.py
Created December 10, 2010 02:09
send emails to users when their account expires soon. Made for LinuQ
#!/usr/bin/python2
# coding=utf-8
import csv
import datetime
import codecs
import smtplib
import traceback
import os.path
from email.mime.text import MIMEText
@gelendir
gelendir / gmail_proxy.py
Created December 5, 2010 21:14
Proxys SMTP requests to Gmail's SMTP server
#!/usr/bin/python2
"""
Simple SMTP Gmail proxy
By Gregory Eric Sanderson Turcot Temlett MacDonnell Forbes
One of the servers that I maintain has a crappy Exim that randomly crashes. In a fit of frustration,
while looking for a solution that would notify me when problems occured, I hacked together this script.
When monit can't send me warning messages through Exim, it sends them to my gmail account through
this script that acts as a backup SMTP server.
@gelendir
gelendir / infb.css
Created November 27, 2010 18:35 — forked from ruel/infb.py
A script to scrape information from your facebook friends
/*
Ruel Pagayon (c) 2010 - ruel@ruel.me
Cascading Style Sheet for InFB Log Output.
*/
body {
background-color: #3C3C3C;
color: #FFF;
margin-top: 50px;
margin-left: 25px;
@gelendir
gelendir / java2python.py
Created November 26, 2010 02:56
java2python
#!/usr/bin/python
import sys
from optparse import OptionParser
usage = """%prog : convert java app to an equivalent in python code.
usage : %prog PROGRAM"""
parser = OptionParser(usage=usage)
(options, args) = parser.parse_args()
@gelendir
gelendir / skt.py
Created October 24, 2010 01:40
translate string into klingon stupidly
"""
Stupid Klingon Translator (SKT)
hacked together in 5 minutes by :
Gregory Eric Sanderson Turcot Temlett MacDonnell Forbes
Hubert and Mathieu gave me the brilliant idea of implementing a gettext klingon translator
for python projets that use internationalization. Instead of diving in to the
gettext API (BOOOOORING) I hacked together a small function that scrapes Mr.Klingon's
website for translated strings. (http://mrklingo.freeshell.org/uta/index.php)