Posts about computers
Export Mysql result as CSV

Don't ask me how the sed magic works, but it does. Taken from here.

Running this: mysql -u<USER> -p<PASSWORD> <DATABASE> -B -e "select * from videos_video;" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' will produce something like this:...

Enable/disable spotlight in OSX

This is just a self reminder on how to disable and enable spotlight in Snow Leopard and Lion. Open a terminal and type: To enable:

sudo mdutil -a -i on To disable: sudo mdutil -a -i off In system preferences you can control which drives and/or...

Nice tweaks for OSX

I think most of them work on both Snow Leopard and Lion. Not sure about previous versions. Just type the ones you want to activate/deactivate on the command line and have fun. # Enable full keyboard access for all controls (e.g. enable Tab in modal...

NonUniqueObjectException- a different object with the same identifier value was already associated with the session

If you are developing in Swing and using hibernate you might - at some point in time - run into this exception: org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session

What...