Bits and pieces

A few quick notes before heading of into vacation.


Ever seen this or a similar error message on your Mac?

could not create shared memory segment: Invalid argument  

This happened to me when I tried to increase the number of max_connections parameter in the postgres configuration file. After increasing the maximum connections I got another error message which told me to increase the shared_buffers size as well. And finally, after that I got the error message above. After some research I found out that for some reason the system shared memory value on Mac OS X is out of historic reasons very low. Go figure.

The thing to do is to edit /etc/sysctl.conf and add something like this:


The parameter which is important is kern.sysv.shmmax. You can view the current setting via sysctl -A or more specifically sysctl kern.sysv.shmmax. I had to restart my computer to get the values to take effect.


I started to use git more and I must say it is growing on me. However, since most of the projects I am working with are still on svn I have to use git-svn. Most of the time everything works just fine, but one thing I am looking for is a tool which converts a git patch to a svn patch. Unfortunately, a git patch will not directly apply into a svn repo. Problematic are especially file additions and removals. So far I haven't found a satisfactory solution. Anyone?


I thought I pass on this cool little ruby gem I found and started using - Cheat Sheets. Just install it via sudo gem install cheat and then you can access any of the built-in cheat sheets, for example cheat git. And of course you can simple add your own cheat sheets. Sweet.


More of a question really. Does you Android phone shuts down properly? I had several occasions now where my phone shut down, because it was running out of power (well, we all know how great the battery life time is :( ). In each case I had to pull out the battery in the end, because the shutdown would never complete. Does anyone have similar experiences?