Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/python
import sqlite3
conn = sqlite3.connect('/tmp/example')
c = conn.cursor()
# Create table
c.execute('''create table stocks
#!/usr/bin/python
# migrate torrents from ktorrent to transmission
import re
import os, os.path
ktorrent_path=os.path.expanduser("~/.kde/share/apps/ktorrent")
transmission_address = "localhost:27577"
transmission_args = ""
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Send RSS feed items to email as plaintext converted by lynx
__revision__ = '0.0.1'
import shelve, urllib, smtplib, popen2, os
import cgi
from xml.dom.minidom import parse
#!/usr/bin/perl -w
# Convert cyrilic characters in file names to transliterated latin symbols. Used for mp3s, for example.
use utf8;
use Encode;
use File::Find;
use locale;
$fs_encoding = 'utf-8';
#!/usr/bin/perl
# Йожыный пыпереводчик
use locale;
while (<>)
{
$_=lc();
s/(\w+)/transword($1)/eg;
#!/usr/bin/python
# Directconnect bot
import asyncore, socket, re, sys, atexit, time
__revision__ = '0.0.1'
config = {'nickname': 'DoctorThanatos',
'interest': 'Stats bot',
'speed': 'DSL\x01',
#!/bin/sh
# Saves threads from Wakaba (particularry 2ch.ru that is dead now)
BOARD=`echo $1|sed -e 's/http:\/\/[^\/]*\/\([^\/]*\)\/.*/\1/'`
wget -r -p -nc -nH -I/$BOARD/src,/$BOARD/thumb,/css,/cgi-bin -e robots=off -nd -k $1
__module_name__ = "quotes"
__module_version__ = "0.1"
__module_description__ = "Converts '\"' quotes to typographical"
import xchat, re
already_said=1
regexii = [ re.compile('"(\s|\Z)'),
re.compile('(\s|\A)"')
]
#!/bin/sh
# Convert all AMRs in current directory to WAVs
for amrfile in *.amr;
do
outfile=`basename $amrfile .amr`.wav
mplayer $amrfile -ao pcm:file=$outfile
done
startshape all
rule all {
40* {x 0.1} initialsplat { hue 0 sat 1 b 0.25 }
cuts {x 1.5 y -1.3}
}
rule initialsplat 0.1 {
splat {}
scatter {}