basement music player part 1

Having got the old computer hooked up to the network I proceeded to work on its setup. My main intention for it is to play music from the network drive, while I’m down in the basement working on my other hobbies. I upgraded it with the latest Debian, since that is about the only Linux […]

pulseaudio discoveries

Found out that PulseAudio includes built in support for creating multicast RTP streams of whatever audio you may be playing on your computer. Then I found out if I turn on such a stream, it eats all the wireless bandwidth in the house and my wife complains her internet isn’t working. Nix that idea…

kill 1

I started wondering what would happen if I kill -9 1 But I have enough of a guess that I don’t want to do it while my computer is doing anything else Maybe later.

screen grab logging

This is more of a short-term workaround than a solution, but it’s kind of fun. I’m doing some performance testing of one of our java servers, and I want my test to run in the night while I’m asleep. The test has previously been run using jconsole to get graphs of memory and thread usage. […]

dns323 podcast downloader

Our server box is taking over lots of little download tasks for us. The next thing I wanted it to do is automatically get podcasts. Being a Ruby fan I knocked up a little script – it’s handy having RSS reading as a core language library! #!/ffp/bin/env ruby require ‘open-uri’ require ‘rss’   CONFFILE=’/ffp/etc/mypodder.conf’ PODCASTDIR=’/mnt/HD_a2/podcasts’ […]

line numbers in shell

AKA ‘Today’s exciting shell command I learned’ nl e.g. $ echo -e "hello\ncruel\nworld" | nl 1 hello 2 cruel 3 world

ack – best thing since sliced bread

Someone at work recently pointed out ack. It’s a powerful replacement for find and grep. My favorite features: it ignores CVS/.svn directories; can easily specify file types with a flag (and of course define your own types); and it has colour highlighting on the output. On Ubuntu it is called ‘ack-grep’ instead of just ‘ack’: […]

fantasy video player box

(I say ‘fantasy’ because we’ve had thoughts about this for a year or more, but we have more important things to spend our money on). We don’t watch much normal TV. Cable doesn’t seem worth it. However we use a certain site to get bittorrent downloads of British shows we like. This currently means we […]

cut with multiple spaces

Today’s little command line lesson. Unix cut command takes a parameter which tells it the delimiter character to use. Often this is a space. However it only ever matches a single character, so when you have a line with extra spacing to make some columns line up, this doesn’t work right. Instead of just using […]

log file processing

I seem to have been doing lots of this kind of thing recently. grep "FOUND query" bak0*b_hac-server.log | awk ‘{print $8}’ | awk ‘BEGIN { FS = "|" }; { print $6 }’ | sort | uniq -c Remember, usually you want to sort before uniq.