Skip to content

Instantly share code, notes, and snippets.

View mdigital's full-sized avatar

Robin Marshall mdigital

View GitHub Profile
@mdigital
mdigital / .bash_profile
Created May 31, 2012 21:25
.bash_profile function to name your terminal windows
function st {
title=$1;
echo -e "\033];${title}\007";
}
@mdigital
mdigital / tarsnap-install.sh
Created April 18, 2012 02:40
Debian / Ubuntu Tarsnap installation
#!/bin/sh
# Installs tarsnap client on Debian and Ubuntu
#
# You'll need to setup an account at
# http://www.tarsnap.com
# and load it with some funds
#
# Make sure you run this as root
#
@mdigital
mdigital / pwm.py
Created February 27, 2012 03:32 — forked from arthurnn/pwm.py
beaglebone PWM
from mmap import mmap
import struct
MMAP_OFFSET = 0x44c00000 # base address of registers
MMAP_SIZE = 0x48ffffff-MMAP_OFFSET # size of the register memory space
CM_PER_BASE = 0x44e00000 - MMAP_OFFSET
CM_PER_EPWMSS1_CLKCTRL = CM_PER_BASE + 0xcc
CM_PER_EPWMSS0_CLKCTRL = CM_PER_BASE + 0xd4
CM_PER_EPWMSS2_CLKCTRL = CM_PER_BASE + 0xd8
@mdigital
mdigital / gist:1094836
Created July 20, 2011 12:01 — forked from paulirish/gist:366184
html5 geolocation with fallback.
// geo-location shim
// currentely only serves lat/long
// depends on jQuery
;(function(geolocation){
if (geolocation) return;
var cache;