klenwell information services : SpecialCocktailNapkin

Revision [1029]

This is an old revision of SpecialCocktailNapkin made by KlenwellAdmin on 2009-02-18 15:04:05.

online cocktail napkin

links and notes for later organization
CocktailNapkin2008 2008 Napkin
CocktailNapkin2007 2007 Napkin

/* background: color image repeat attachment position */
background: #FFCC66 url("file or url name") no-repeat fixed right bottom;

Plato's Symposium
mysqldump dbname | ssh user@remoteserver "cat - > dbname.db"
pastebin: Paste20090117 CakePhp Custom Pagination Methods
in case you missed 1978
perfect weather/dead oceancurrent
pastebin: Paste20090110 Klenwell CakePhp Form Helper
python regex (I could have sworn I pasted this here before):
import re

# compile
html = "'<html>\n<head>\n<title>Title</title>\n</head>\n</html>"
regex = re.compile('<.*?>',)
result = regex.search(html)
print result.group()

# ungreedy
html = "'<html><head><title>Title</title>"
print re.search('<.*?>', html).group()

# substitution
dirty = "some alphanum and some other ^$#%&*%!"
rgx = r'[^a-zA-Z0-9]'     # alphanum only!
clean = re.sub(rgx, '',  dirty)