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 / compose.sh
Created September 5, 2012 07:56
Set X compose key
setxkbmap -option compose:rwin
@adamvr
adamvr / genres.txt
Created September 3, 2012 18:33
id3 genre numbers
0 - Blues
1 - Classic Rock
2 - Country
3 - Dance
4 - Disco
5 - Funk
6 - Grunge
7 - Hip-Hop
8 - Jazz
9 - Metal
@adamvr
adamvr / Notes.md
Created August 24, 2012 10:43
Loading id3v2 into an mp3 based on a tracks file

Possibly better served by an awk script and a more detailed tracks file, but it's a nice quick and dirty solution.

Also scraping the tracks file from wikipedia or elsewhere would be cool too.

@adamvr
adamvr / rename.sh
Created August 24, 2012 10:38
Retagging mp3s based on filename
for i in *
do
id3v2 -a "$artist" -A "$album" -t "${i%%.mp3}" "$i"
done
@adamvr
adamvr / action.log
Created August 24, 2012 10:36
Prepending zeroes to mp3 filenames
mv The Alchemist - Part 10.mp3 The Alchemist - Part 10.mp3
mv The Alchemist - Part 11.mp3 The Alchemist - Part 11.mp3
mv The Alchemist - Part 12.mp3 The Alchemist - Part 12.mp3
mv The Alchemist - Part 13.mp3 The Alchemist - Part 13.mp3
mv The Alchemist - Part 14.mp3 The Alchemist - Part 14.mp3
mv The Alchemist - Part 15.mp3 The Alchemist - Part 15.mp3
mv The Alchemist - Part 16.mp3 The Alchemist - Part 16.mp3
mv The Alchemist - Part 17.mp3 The Alchemist - Part 17.mp3
mv The Alchemist - Part 18.mp3 The Alchemist - Part 18.mp3
mv The Alchemist - Part 19.mp3 The Alchemist - Part 19.mp3
@adamvr
adamvr / README.md
Created August 22, 2012 20:25
Extracting music from an iDevice

Introduction

This script is specifically designed for reconstituting mp3s from the silly hash directories iDevices store their music in. It requires that the mp3s have working id3v2 tags, so use something like find . -name '*.mp3 -print0 | xargs -0Ixx id3v2 -C "xx" to convert them if they're in id3v1.

Usage

./extract.sh ~/music /media/IPOD/iPod_Control/Music

Caveats

@adamvr
adamvr / brew_install_bad.log
Created August 21, 2012 08:24
Problems with compiling gdbm and zsh through linux homebrew
==> Installing zsh dependency: gdbm
==> Downloading http://ftpmirror.gnu.org/gdbm/gdbm-1.10.tar.gz
File already downloaded in /home/adam/.homebrew/cache
/bin/tar xf /home/adam/.homebrew/cache/gdbm-1.10.tar.gz
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/gdbm/1.10 --mandir=/usr/local/Cellar/gdbm/1.10/share/man --infodir=/usr/local/Cellar/gdbm/1.10/share/info --enable-shared
./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/gdbm/1.10 --mandir=/usr/local/Cellar/gdbm/1.10/share/man --infodir=/usr/local/Cellar/gdbm/1.10/share/info --enable-shared
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
java -Xms512m -Xmx1024m -cp "~/Library/Application Support/minecraft/bin/*" -Djava.library.path="bin/natives" net.minecraft.client.Minecraft "ohpenis"
@adamvr
adamvr / README.md
Created July 26, 2012 03:14
Openwrt scripts

Openwrt scripts

A couple of scripts for publishing the state of an openwrt router to mqtt.

Relies on mosquitto_pub and mosquitto_sub being present

init

Init.d scripts including one to start a pair of file monitors and one to publish whether or not the router is onlien

@adamvr
adamvr / .gitignore
Created July 24, 2012 01:20
HTTP Agent and request logger
node_modules