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 / 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 / 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 / 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 / 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 / compose.sh
Created September 5, 2012 07:56
Set X compose key
setxkbmap -option compose:rwin
@adamvr
adamvr / chapterify.sh
Created September 13, 2012 09:18
chapterify a directory of mp3s
#!/bin/sh
# Chapters
for chap in *
do
cd "$chap"
chapterFile="$chap".mp3
tmp=tmp.mp3
# Files
for file in *.mp3
@adamvr
adamvr / fiddle.css
Created December 3, 2012 11:39
Fiddlin
@import url('http://twitter.github.com/bootstrap/assets/css/bootstrap.css');
@adamvr
adamvr / bench-array.js
Last active December 14, 2015 13:08
Buffer concat vs array concat vs buffer write performance
var array = [];
for (var i = 0; i < 10000; i += 1) {
array = array.concat(['test']);
}
var buffer = new Buffer(array);
@adamvr
adamvr / .gitignore
Last active December 14, 2015 14:09
mqtt.js benching
node_modules
@adamvr
adamvr / .gitignore
Last active December 14, 2015 15:19
memory consumption of MQTT.js client
node_modules