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.
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&
. typename
is required due to deep c++ voodoo that I really don't understand.
Or you could just…
map.count( key ) > 0;
Always learning.
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
reboot
# success!
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 224.0.0.1.
# setup the routes
ip route add 224.0.0.0/4 dev eth0
# try to ping the multicast aware hosts on your lan with 2 pings
ping -c 2 224.0.0.1
# 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 224.0.0.1
# 100% packet success!
# make your change permanent
sudo echo "net.ipv4.icmp_echo_ignore_broadcasts = 0" >> /etc/sysctl.conf
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
Based off of a script by Adam Pierce. Mine is a little more user friendly.
Get latest version here.
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
.
extension=imap.so
extension=curl.so
Your mileage may vary.
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
Solution:
edit /etc/idmapd.conf
uncomment and edit Domain = <your nis domain>
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.
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.
cd
mkdir tmp
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