This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
BREW_RUBY_BIN="/usr/local/Cellar/ruby/1.9.3-p0/bin/" | |
echo "--- installing pre-requsite gems" | |
echo "rails | |
haml | |
nokogiri | |
will_paginate | |
deltacloud-client | |
simple-navigation | |
rest-client |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Author: David Busby <david.busby@psycle.com> | |
### BEGIN INIT INFO | |
# Provides: edge | |
# Required-Start: $supernode | |
# Required-Stop: | |
# Default-Start: 3 5 | |
# Default-Stop: 0 1 2 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rpm -qa | while read pname; do RES=`rpm -qR $pname`; [[ "$RES" == "" ]] && echo "$pname has no deps"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do curl -H'User-agent: AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.125 Safari/537.36' -s 'http://www.game.co.uk/webapp/wcs/stores/servlet/HubArticleView?hubId=639265&articleId=639266&catalogId=10201&langId=44&storeId=10151&&cm_mmc=Facebook-_-Digital-_-Fallout4-_-Link#NaN' | grep 'Check back later today' || chromium https://www.youtube.com/watch?v=H91rPIq2mN4; sleep 10; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# ensure CWD contains dirs root and boot | |
# ensure sd card has not automounted elsewhere | |
# ensure ArchARM-rpi2.tgz exists in CWD | |
# ensure partitions configured as per: http://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2 | |
# | |
mkfs.vfat /dev/mmcblk0p1 && \ | |
mount /dev/mmcblk0p1 ./boot && \ | |
mkfs.ext4 /dev/mmcblk0p2 && \ | |
mount /dev/mmcblk0p2 ./root && \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -e | |
# | |
# rc.local | |
# | |
# This script is executed at the end of each multiuser runlevel. | |
# Make sure that the script will "exit 0" on success or any other | |
# value on error. | |
# | |
# In order to enable or disable this script just change the execution | |
# bits. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os, glob, re | |
def main(): | |
p = re.compile('^([0-9a-f]+-[0-9a-f]+)\s[a-z\-]{4}\s[0-9a-f]{8}\s[a-z0-9]{2}\:[a-z0-9]{2}\s[0-9]+\s+(.*)$') | |
smaps = glob.glob('/proc/[0-9]*/smaps') | |
for smap in smaps: | |
lines = open(smap).readlines() | |
for line in lines: | |
m = p.match(line) | |
if m and 'libc' in line: | |
name = open(smap.replace('smaps','status')).readlines()[0] |