m4a to mp3
[ link: m4a-to-mp3 | tags: music mp3 | updated: Fri, 23 Jul 2010 19:31:05 ]
I was at Bridgehead earlier today and heard a cool tune. I asked the staff what it was, and they told me that it was Low Strung. After coming home I wanted to get the CD, but was unable to find it anywhere but iTunes. I don't do iTunes, because Apple doesn't do Linux... but fortunately my wife has a Mac.
So, after getting the album I had to convert it from .m4a to .mp3. I figured I'd share my script...
convert-m4a-to-mp3. You'll need
to grab a few packages to use it: apt-get install zsh faad id3v2 twolame toolame.
cd dir-with-m4a-files
./convert-m4a-mp3
Ta da!
git 1.7.2 is out
[ link: 20100723134522 | tags: git | updated: Fri, 23 Jul 2010 13:48:02 ]
Just announced is release of Git version 1.7.2.
Scanning through the ReleaseNotes the following look interesting:
git -c var=valwill override configgit show :/patternnow uses regexgitno longer squelches if it doesn't find .git (useful when using in PS1)git checkout --orphan namemakes a new root branch (no parent)git cherry-pickcan now be given a list of refsgit log --decoratelearned to colour more things
console=ttyS0 with grub2
[ link: 20100523092001 | tags: ubuntu grub linux | updated: Sun, 23 May 2010 09:22:26 ]
Just a quick note so I don't forget now to enable console logging on systems running grub2 (like Ubuntu 10.04, Lucid).
- edit
/etc/default/grub- set
GRUB_CMDLINE_LINUXto"console=ttyS0,115200n8 console=tty0"
- set
- run
update-grub - reboot
( more info can be found here )
How many times is my function used within an executable?
[ link: 20100426162644 | tags: debug devel linux | updated: Tue, 27 Apr 2010 09:19:35 ]
I am working on a large kernel module which had just come out of a large (and fruitful) internal API refactoring exercise. I now want to go through and cull the unused functions.
It turns out, all that is needed is the readelf utility (part of binutils package).
vmlinux on Ubuntu
[ link: 20100412100135 | tags: ubuntu linux kernel | updated: Mon, 12 Apr 2010 10:08:22 ]
If you're trying to do post-mortem analysis on a crashed river, or trying to find kernel-level
bottlenecks with oprofile, you need the decompressed kernel w/ debug symbols. This comes in a
form of a vmlinux file. Some distributions ship debuginfo packages, namely RHEL. On Ubuntu
this seems lacking.
where your WIND coverage ends
[ link: 20100328152951 | tags: wind | updated: Sun, 28 Mar 2010 15:46:52 ]
I got a SIM card from WIND on Friday, the opening day,
and put it into my Nexus One. All of a sudden everyone I know wants me to drop
by their house to test the service there. Guys, it's only $15 for a month of testing... :D
So far, in my neighbourhood (Central Park), and the surrounding area (drove down Merivale, Baseline, Carling, and Kirkwood), I get 3-4 bars (out of 4). I am well covered here, it seems.
The family and I were going out of town on Saturday, so I asked my lovely wife to note the changes in the signal as we drove west out of Ottawa on the 417 towards Arnprior. Here is what she wrote down:
Along 417 signal dropped to two bars outside of Bayshore briefly before returning to four bars when approaching Kanata. Two bars noted again at Scotiabank Place, with zero bars quickly after. At Stittsville exit service switched to roaming (Rogers GSM network) at four bars, which quickly fell to no signal.
So there you have it, Nepean to Kanata is well covered. But, if you live past the hockey arena, you're not likely to chose WIND. While out in the bush, the WIND coverage is pretty much as good as Rogers... I had two phones with me (one on Rogers and one on WIND Away) and I didn't see any significant difference -- as you'd expect.
Nexus One live in Ottawa on WIND Mobile
[ link: nexus-on-wind-in-ottawa | tags: wind | updated: Fri, 26 Mar 2010 17:44:33 ]
I visited the WIND Mobile store at Westgate Mall this morning and signed up for WIND service. (I was the first geek there... yeay!) I am using my Nexus One and getting 3..4 bars for voice (out of 4), and decent data throughput.
the WIND excitement
[ link: wind-in-ottawa | tags: wind | updated: Thu, 11 Mar 2010 21:05:31 ]
I heard that WIND stores were actually open in Ottawa, but they are not authorized to sell anything yet.
One such store is 5 minutes from my house, at the Westgate mall, so I dropped by on my lunch break.
sata hotswap pico-HOWTO
[ link: sata-hotswap-howto | tags: sata linux | updated: Tue, 02 Mar 2010 17:14:02 ]
I had been unpleasantly informed by mdadm that sdc has been failing. Yey, another one -- I thought. Not wanting to disrupt most of my day, I decided to try hot swapping the disk.
serving http content out of a git repo
[ link: http-out-of-git | tags: git web lighttpd | updated: Sat, 27 Feb 2010 10:37:08 ]
While preparing for my Git Workshop for Flourish Conf, I thought about serving files over http directly out of a git repo.
Here is a short shell script that I came up with: git-serv.cgi.
It takes request URLs like http://domain/examples/dir/file and looks up the
objects in a bare git repository in /home/git/examples.git. It looks only on
the master branch, and nothing is ever checked out. If it finds a tree
object, it prints the file listing at that point in the tree. If the object is
a blog, it dumps the contents. Otherwise some error is reported.
The other way to achieve something similar would be to use a hook script, like what I used with my resume post-update hook.
