Skip to content

Instantly share code, notes, and snippets.

View mrdaemon's full-sized avatar

Alexandre Gauthier mrdaemon

View GitHub Profile
# When testing changes, the easiest way to reload the theme is with /RELOAD.
# This reloads the configuration file too, so if you did any changes remember
# to /SAVE it first. Remember also that /SAVE overwrites the theme file with
# old data so keep backups :)
# TEMPLATES:
# The real text formats that irssi uses are the ones you can find with
# /FORMAT command. Back in the old days all the colors and texts were mixed
# up in those formats, and it was really hard to change the colors since you
servers = (
{ address = "irc.stealth.net"; chatnet = "IRCnet"; port = "6668"; },
{ address = "irc.efnet.net"; chatnet = "EFNet"; port = "6667"; },
{
address = "irc.undernet.org";
chatnet = "Undernet";
port = "6667";
},
{ address = "irc.dal.net"; chatnet = "DALnet"; port = "6667"; },
{
@mrdaemon
mrdaemon / forums.sql
Created December 8, 2011 03:43
A simple MySQL schema for some sort of forums
/* Database Schema for simple Forums
* Author: Dee the great amateur RDBS wizard
* 07 Dec 2011 - Initial Version
*/
/* NOTE: You may want to alter this according to this setup,
* especially if you are not running the script as root and
* just need the tables.
*/
from twisted.internet.protocol import Factory
from twisted.protocols.basic import LineReceiver
"""
Protocols/Transports for slop
STATUS CODES CHEAT SHEET:
1xx - informational messages
100 - Connection Established / Banner
101 - MOTD / Admin Message
#!/usr/bin/env python
from gevent.server import StreamServer
def echo(socket, address):
""" Handler for shitty echo server """
print "New connection from %s:%s" % (address)
fileobj = socket.makefile()
fileobj.write("Welcome to the anus over tcp/ip server!\n\r")
class AnusItch extends Unpleasantness {
public void itch(Wart w){
// code for when your butt itches because of a Wart
}
public void itch(Hemorroid h){
}
#!/usr/bin/env python
#
# Shittiest script to scrape http://irssi.org/themes and fetch the theme
# image screenshots, because frankly, that shit is unviewable.
from os import path, mkdir
import re
import sys
import urllib2
from urlparse import urlsplit, urljoin
>>> import yaml
>>> stream = file('general_skills.yaml', 'r')
>>> skills = yaml.load_all(stream)
>>> skills
<generator object load_all at 0x02B29698>
>>> for skill in skills:
print skill
# So you end up with one dict per skill, which can be accessed using dict['key'] to get the values.
grep -i -e "could not" -e "cannot" sfclog.txt | awk -F ';' '{ print $1; }' | awk -F "??" '{ print $3; }' | sed -e 's/^\\//' -e 's/"\\\[.*\]"/\\/g' -e 's/"$//' | sort | uniq | tee -a ./win7sysfiles/FILELIST.TXT | sed -e '/^$/d' -e 's/\\/\//g' -e 's/^C:\(.*\)$/\/media\/wsystem\1/' -e 's/\([ ()]\)/\\\1/g' | while read i ; do if [ -f "$i" ] ; then STATUS="ERROR" ; cp "$i" ./win7sysfiles/ && STATUS="COPIED" ; else STATUS="MISSING" ; fi ; printf "%-30s%-30s\n" "`basename \"$i\"`" "[$STATUS]" ; done && echo -n "Creating checkums..." ; for f in ./win7sysfiles/* ; do md5sum $f > $f.md5sum ; done ; echo "done."
#!/usr/bin/env bash
PROJECTS=$(pwd)/_VisualStudio2005/Projects
WEBROOTS=$(pwd)/_VisualStudio2005/WebSites
function die {
echo $1 ; exit 1
}
[[ -z $1 ]] && die "usage: import.sh [svn url]"