Skip to content

Instantly share code, notes, and snippets.

--
--microsoft sql server
--get element from string by tags, mostly useful for MSSQL versions lacking (prior to) a native xml-datatype
--
--common
CREATE FUNCTION get_ElementByTags ( @vXML varchar(max) , @vTag varchar(64) )
RETURNS varchar(512)
BEGIN
# construct shell commands, then pass them to the shell interpreter
ls Life\ -\ S02E* | awk '// {print "mv" , "\"" $0 "\"" , "life__" $3 "--[0000]hdtv[eng]-" $5}' | sh
@khaije1
khaije1 / pythonic switch
Created December 18, 2010 19:21
fun w/ Python
"""Pythonic Switch Statement
i'm going to have fun using this to dynamically construct a database-backend abstraction using my atomicnode concept... Yay!
Dictionary trees own. HAHA I love them!
"""
class switchdict():
"""
a pythonic form of the switch statement, more traditionally expressed as...
"""