@ wrote... (11 years, 10 months ago)

To autostart the very excellent SickBeard and SABnzbd on OSX (Snow Leopard in my case) you need to create two plist files and then tell launchd to start them.


Category: tech, Tags: osx
Comments: 6
@ wrote... (11 years, 12 months ago)

Any Standard Template Library (STL) pro doesn't need to be told this but for somebody moving from MFC to the STL like me, the following would no doubt be handy.

The problem is that std::map creates a new object anytime you have map[key], even as an rvalue. So here is a super simple template function to quickly check if a map has a key.

template<typename T>
bool has_key( const T& map, typename const T::key_type& key )
    T::const_iterator iter = map.find( key );
    return iter != map.end();

// eg. has_key( my_map, "key" );

The tiny bit of magic here is the typename in typename const T::key_type&amp;. typename is required due to deep c++ voodoo that I really don't understand.

Or you could just…

map.count( key ) > 0;

Always learning.

Category: tech, Tags: cpp, stl
Comments: 0
@ wrote... (12 years ago)

There is something seriously wrong with my server, I can only write over nfs at 5 MB/s. Local writes rarely break 35 MB/s. I've tried disabling sync but to no avail. So… I'm afraid I'm going to have to dump Solaris for Linux and part of that is re-arranging my drives.

As a stop-gap measure I want to run Solaris in a virtual machine, and I want my LSI 2008 controller to be pci passed through, so I had to move my rpool from one controller to the LSI.

Like everything Solaris, this was harder than it should have been. Solaris 11 does not have failsafe mode so all of the awesome howto's only apply to Solaris 10.

# boot to single user mode via grub
kernel$ ... -s
# can't boot, can't find rpool

# boot with solaris cd, thankfuly my motherboard is awesome and I
# can redirect an iso into a virtual cdrom via ipmi

zpool import rpool
# error, previously mounted on other host (or something like that)

zpool import -f rpool
zpool status
# very different disk ids

# success!
Category: tech, Tags: solaris, zfs
Comments: 2
@ wrote... (12 years ago)

I was trying to get multicast working and all of the ancient howtos weren't helping.

Purely by accident I found the solution to the multicast “hello world” of pinging

# setup the routes
ip route add dev eth0

# try to ping the multicast aware hosts on your lan with 2 pings
ping -c 2
# 100% packet loss

# stop ignoring broadcasts
sudo echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

# try to ping the multicast aware hosts on your lan with 2 pings
ping -c 2
# 100% packet success!

# make your change permanent
sudo echo "net.ipv4.icmp_echo_ignore_broadcasts = 0" >> /etc/sysctl.conf
Category: tech, Tags: linux, networking
Comments: 0
@ wrote... (12 years, 2 months ago)

Installing Virtualbox 4.1.6 on Solaris 11 Express hung my machine and even prevented it rebooting successfully. I suspect a faulty kernel module. Thankfully I have auto-snapshots running and could rollback my rpool after booting from the install cd.

This was a truly miserable experience as my Solaris-Fu is much weaker than my Linux-Fu.

  • Boot from install dvd
  • zfs rollback rpool@thismorning
Category: tech, Tags: solaris
Comments: 0
@ wrote... (12 years, 3 months ago)

Based off of a script by Adam Pierce. Mine is a little more user friendly.

Get latest version here.


Category: tech, Tags: shell
Comments: 0
@ wrote... (12 years, 4 months ago)

If you use (or are trying to) the very excellent Roundcube but you keep getting the white screen of death, then here's something to try.

As a quick test, disable the curl extension in your /etc/php.ini

;extension = curl.so

and restart your webserver…

sudo service httpd restart

If that seems to solve the problem (you can see the login screen and not a whitescreen) then try the fix that worked for me. Move curl.so after imap.so.


Your mileage may vary.

Category: tech, Tags: linux
Comments: 0
@ wrote... (12 years, 7 months ago)

I have two Fedora 15 machines, they both authenticate using NIS and mount home directories via NFS. The first machine worked perfectly, the second did not. I could login via ssh (nis works) but all my file owners were nobody:users.

Anyhow, through much trial and error I learned about /etc/imapd.conf. So after booting my machine, if I restarted rpcidmapd and autofs then the file permissions were correct.

After much Googling I found this


edit /etc/idmapd.conf
uncomment and edit Domain = &lt;your nis domain&gt;

If I had to guess, I think the NIS domain isn't being set until after rpc.idmapd and automount are started. That's why restarting the services later seems to work. Or whatever. Why it works on one fresh install but not the next I'll never know.

Category: tech, Tags: fedora, linux, nfs
Comments: 1
@ wrote... (12 years, 8 months ago)

On Fedora 15 if you can't login because you get a

gconf-sanity-check-2 exited with status code 256 error

login via the text console (ctrl-alt-f2) and make a tmp directory.

mkdir tmp
Category: tech, Tags: fedora, linux
Comments: 0
@ wrote... (12 years, 8 months ago)

Building my file sever was a nightmare. Various issues in no particular order.

  • VirtualBox causes Solaris host to “pause”
  • KVM crashes Linux host when trying to passthrough LSI scsi controller
  • ESXI uses a lot of ram
  • ESXI requires windows client
  • mysql doesn't work through nis (owner permissions)
  • setting up a useful solaris zone is a lot of work
  • xen can't create any vm. XenUnifiedLookupByName error
  • rebooting takes several minutes
  • ipmi continual ends the session after 60 seconds
  • console redirect doesn't always capture F-keys
  • VMWare guest machines can't boot off of passed through hardware
Category: tech, Tags: hardware, solaris
Comments: 0