Skip to content

Instantly share code, notes, and snippets.

View Oneiroi's full-sized avatar
:shipit:

David Busby Oneiroi

:shipit:
View GitHub Profile
@Oneiroi
Oneiroi / wordpress_importer.rb
Created February 9, 2012 17:41 — forked from stammy/wordpress_importer.rb
Import a WordPress database and generate markdown files for Jekyll
# based on the import script by icebreaker, which is based on mojombo's
# https://github.com/mojombo/jekyll/blob/master/lib/jekyll/migrators/wordpress.rb
# https://gist.github.com/303570
# edited to rewrite image URLs to use my CloudFront URL
require 'rubygems'
require 'sequel'
require 'fileutils'
require 'yaml'
@Oneiroi
Oneiroi / gist:1276622
Created October 10, 2011 21:35
CentOS single nic bridge
put this in ifcfg-br0 :
DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
IPADDR=xxx.xxx.xxx.xxx
NETMASK=xxx.xxx.xxx.xxx
GATEWAY=xxx.xxx.xxx.xxx
ONBOOT=yes
DELAY=0
@Oneiroi
Oneiroi / find_packages_with_no_deps
Created October 9, 2011 12:26
Find packaes with no dependencies
rpm -qa | while read pname; do RES=`rpm -qR $pname`; [[ "$RES" == "" ]] && echo "$pname has no deps"; done
@Oneiroi
Oneiroi / scanosx.py
Created February 16, 2011 09:46
Scanning for available USB tty devices on OSX differes slightly from Linux.
#adapted from pySerial examples for use on OSX systems
import serial
from glob import glob
def _scan():
dev_list = glob('/dev/tty*usb*')
available = []
for dev in dev_list:
try:
s = serial.Serial(dev)