Category: Misc

  • Shairport: Pop, crackle and other noise

    I’m using the C version of Shairport on 64bit Ubuntu Natty to receive streaming audio from iTunes and iDevices. It’s working well, but there was a problem with the sound quality: popping and crackling noise made my music sound like it’s coming from a vinyl record. dmesg was reporting that the HPET timer had to…

  • Rebooting a Virtouzzo/OpenVZ container

    If you want to reboot from inside the container, do a touch /reboot before you shutdown -r now. This will mark the container for reboot, and a cron job on the container host will power it back on after it shut down. Only when both commands are run the container will reboot correctly.

  • Ubuntu 11.04: grub fails after setting up RAID6

    I tried to install Ubuntu natty 64bit server on a machine with 4 HDDs. During the setup I partitioned them and assembled a RAID6 array. The very last step of the Ubuntu installation failed. Grub basically said it cannot read the filesystem on any of the HDDs and it could not install itself into the…

  • Mounting CIFS/SMB in fstab fails with “CIFS VFS: No username specified” in syslog

    So you have a line in your /etc/fstab like: //drobo-2.dynhost.lala.com.au/nsbackup  /mnt/nsbackup  cifs  credentials=/root/.smbcredentials,noauto  0  0 and /root/.smbcredentials contains user=username password=pass and you see the error above in your syslog? Try installing the package cifs-utils!

  • Embedding R graphs in Redmine wiki pages

    R is a language for statistical computing and graphics. It is capable of generating graphs and charts in publication quality. I’ve created a plugin for Redmine that allows the user to place R snippets within Redmine wiki pages and automatically embed the generated graphs: The above pie chart was generated from the following Redmine wiki…

  • Toshiba NB300 + Ubuntu Maverick = freezing during install

    This brand new Toshiba NB300 netbook refuses to install Ubuntu 10.10. There seem to be some problems with interrupts and CPU frequency scaling, according to https://bugs.launchpad.net/ubuntu/+source/linux/+bug/638434 . I worked around the freezing installation routine by passing “nohz=off” to the kernel at the PXE prompt. The latest maverick kernel doesn’t seem to have this problem, only…

  • Apple Mail: copy only email addresses, not ‘name address’

    This was introduced in Snow Leopard. Here’s how to get back to the old behaviour: defaults write com.apple.mail AddressesIncludeNameOnPasteboard -bool NO Now when you ⌘-C an address in Apple Mail, only the address will end up in the clipboard.

  • Speed of SCP transfers over Gigabit Ethernet

    I’m getting around 20MB/s with the default cipher, but when choosing arcfour: scp -c arcfour file user@host: the transfer speed doubles to 40MB/s. For rsync, add this to the rsync command line: –rsh=”ssh -c arcfour”

  • SSH passwordless login: ssh-copy-id

    To log on to a remote machine without the need to enter a password each time, you need to copy your SSH public key to the remote machine and add it to the .ssh/authorized_keys file. First, generate a keypair using ssh-keygen, then use this script to copy your key to the remote host: #!/bin/sh #…