Skip to content

Instantly share code, notes, and snippets.

@aleberg
aleberg / xmlsqlite.py
Created November 1, 2015 17:37 — forked from roder/xmlsqlite.py
Convert XML files into SQLite
#!/usr/bin/env python
from optparse import OptionParser
from xml.dom.minidom import parse
import os
import sqlite3
datatypeMap = {
'integer': 'INT',
'datetime': 'DATETIME',
@aleberg
aleberg / .gitignore
Created December 23, 2015 11:41 — forked from octocat/.gitignore
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@aleberg
aleberg / Radio.py
Last active February 21, 2016 15:31
Jasper module to start mplayer process / stream internet radio
import re
from urllib2 import URLError
import os
import signal
import subprocess
WORDS = ["RADIO"]
def handle(text, mic, profile):
try:
@aleberg
aleberg / KillRadio.py
Last active February 21, 2016 15:30
Jasper module to kill mplayer process
import re
import os
import signal
import subprocess
WORDS = ["TURN", "OFF"]
def handle(text, mic, profile):
p = subprocess.Popen(['ps', '-A'], stdout=subprocess.PIPE)
@aleberg
aleberg / .block
Created June 2, 2016 16:01 — forked from mbostock/.block
Collapsible Force Layout
license: gpl-3.0