Skip to content

Instantly share code, notes, and snippets.

View adamvr's full-sized avatar

Adam Rudd adamvr

  • Cologne, Germany
View GitHub Profile
@adamvr
adamvr / pygit-sip-version-number.patch
Created February 2, 2011 01:52
This patch corrects the required SIP version number in pygit's configure.py
# Changing the version number
diff --git a/configure.py b/configure.py
index 7ed9582..53bd3ad 100644
--- a/configure.py
+++ b/configure.py
@@ -41,7 +41,7 @@ import sipconfig
pyqt_version = 0x040803
pyqt_version_str = "4.8.3"
@adamvr
adamvr / audiobook.sh
Created July 9, 2011 04:59
Creating an m4b audiobook from a bunch of mp3s
find . -name '*.mp3' -print0 | xargs -0 -I {} sh -c 'echo "{}"; n="{}~"; cp "{}" "$n"; id3v2 -D "$n"; cat "$n" >> comb.mp3; rm "$n"'; ffmpeg -i comb.mp3 -acodec libfaac audiobook.m4a; mv audiobook.m4a audiobook.m4b
@adamvr
adamvr / extract-uimage.sh
Created July 13, 2011 05:20
Script for extracting a uimage
#!/bin/sh
#
# Copyright (C) 2010 Matthias Buecher (http://www.maddes.net/)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# http://www.gnu.org/licenses/gpl-2.0.txt
@adamvr
adamvr / mk_sd.sh
Created July 14, 2011 04:37
Bare minimum creating a beagleboard SD card
# Reformat disc
# Create master boot record
sudo parted --script /dev/sdb mklabel msdos
# Setup boot partition as FAT16
sudo fdisk /dev/sdb << END
n
p
1
1
+64M
@adamvr
adamvr / gist:1094274
Created July 20, 2011 03:32
Config file for /etc/network/interfaces
We couldn’t find that file to show.
sudo rootstock --fqdn beagleboard \
--login my_user \
--password my_pwd \
--imagesize 1G \
--dist maverick \
--serial ttyS2 \
--seed alsa-utils,vim,git,build-essential \
--components "main universe multiverse" \
--kernel-image http://rcn-ee.net/deb/maverick/v2.6.37-x1/linux-image-2.6.37-x1_1.0maverick_armel.deb
@adamvr
adamvr / clients.js
Created February 6, 2012 12:04
Submitted by observant - causes repeat transmissions?
/**
* Created by JetBrains WebStorm.
* User: jima
* Date: 6/02/12
* Time: 9:58 PM
* To change this template use File | Settings | File Templates.
*/
var mqtt = require('mqttjs');
var argv = process.argv;
@adamvr
adamvr / README.md
Created February 15, 2012 00:32
A simple script that publishes that it is online when it starts and publishes that it is offline when it quits. Using mqttjs.

purpose

Lively.js is a simple illustration of using MQTT as a device presence indicator

installation

  1. git clone git://gist.github.com/1832048.git lively
  2. cd lively
  3. npm install .
  4. node lively.js ...
@adamvr
adamvr / README
Created February 15, 2012 00:58
Junkcode gist
A bunch of useless files.
@adamvr
adamvr / tabs.css
Created February 21, 2012 09:53
Tab template
#tablist{
padding: 3px 0;
margin-left: 0;
margin-bottom: 0;
margin-top: 0.1em;
font: bold 12px Verdana;
border-bottom: 1px solid gray;
}
#tablist li{