Navicat, Oracle and Mac OSX 10.11 El Capitan

Don’t know if it’s related to my upgrade from 10.10 to 10.11, but today i could not connect to oracle databases using navicat with the error “OID could not be created”.

To fix it type this in Terminal:

$ sudo scutil --set HostName

Then also add this name to the localhost line in /etc/hosts   localhost

Then restart your computer.

GPG and S/MIME in Apple Mail

I use both OpenPGP and S/MIME in my Apple Mail, but by default all new Messages are sent using OpenPGP. It’s easy to change this behaviour in the Terminal:

Set S/MIME as default security method

defaults write org.gpgtools.gpgmail DefaultSecurityMethod -int 2

Use OpenPGP as the default again:

defaults write org.gpgtools.gpgmail DefaultSecurityMethod -int 1

Got this from

Fix for slow mouse on Raspberry Pi

As a remainder:

When using Raspberry Pi Raspbian with some mice, the cursor lags and is slow and feels very unresponsive.

Easy fix:

  • insert your SD card in your computer
  • edit cmdline.txt
  • add this to the end of the cmdline: usbhid.mousepoll=0
  • save, eject SD and start Raspberry Pi
  • done

Git: ignore Mac OSX icon files

When using git on Mac OSX and your project’s folder has a custom icon, you will see a “Iconr” File showing up in your git status or Source Tree. Ignoring this file doesn’t work.

The solution is to ignore the correct way (or syntax), because Apple uses ^M at the end of the filename, which is a CRLF, a hidden character. In fact you have to ignore “Icon^M^M” in your .gitignore file, but it’s not easy to enter these special characters as ^M is in fact one single CRLF character.

I found a hint using the ruby interactive interpreter, but i wanted to use my beloved Python, so here’s the code:

>>> f = open('.gitignore','a')
>>> f.write('Icon\r\r')
>>> f.close()

use this in your home directory as you need to edit ~/.gitignore and ~/.gitignore_global (for Source Tree)

Resize Raspberry Pi SD Card Image

I had the need to shrink a 16GB microSD card to use the image on my other Raspberry Pi, but only had smaller SD Cards lying around. So what now?

After a lot of tests and googling i found a way to get this working on my Mac OSX.

Things you need:

  • Apple Pi Baker
  • gParted Live Image
  • CD Burner and empty CD or an USB Stick with at least 256 MB
  • big SD Card containing current Raspberry Pi image
  • smaller SD Card (2GB, 4GB, …)

Apple Pi Baker is a GUI to copy Raspberry Pi or other .img files to a SD card or USB stick, like using dd from command line, but with the advantage of using a GUI and displaying the time remaining for the process to finish. Additionally you can use it to create a .img from a SD card (backup) or create a Raspberry Pi NOOB SD card.

Part I: gParted

Download gParted live image from

When using a USB drive:

  • convert the downloaded .iso to a .img in the directory containing the .iso with this Terminal command:
hdiutil convert source.iso -format UDRW -o destination.img
  • then use Apple Pi Baker to copy the gParted.img to the USB Stick

When using a CD:

  • open the .iso in Disk Utility
  • Burn this image

Then connect the USB stick to a Mac or PC or boot from the CD.

Start gParted an then select the SD card (on Mac you will need to use a USB SD card reader as the internal SD card reader is not supported) and select the second (big) EXT4 partition and resize it to a bit bigger than the minimum size or a little bit smaller than the desired SD card size (1.9 GB for a 2 GB SD card).

eject the SD card and / or restart your computer.

Part II: create card image and restore

Use Apple Pi Baker to backup your (big) SD card. This will create a image in the size of the card, not in the size of your shrinked image! 

The trick is to restore this image to the smaller SD card. This will work, because you shrinked all partitions below the size of your (smaller) SD card. Apple Pi Baker will diskplay a warning that the image is to big to restore to the SD card, but it will stop when the card is full.

Now we have the smaller SD card and we’re almost finished.

Part III: fix the SD card

Now insert the smaller SD card into your Raspberry Pi and power it on to boot.

Booting will fail as fsck will fail to repair the card automatically. But pressing CRTL-D to continue will fix the problem and reboot the Raspberry.

Part IV: backup the smaller SD card (optional)

Now it’s a good idea to backup the small SD card to a now smaller .img because the backup will always have the size of the card used. Use Apple Pi Baker for this again.

To fill the whole SD card use this command in the Terminal of your gParted Live CD / USB stick, where XXX is the name of the SD card (eg. /dev/sdc2):

# resize2fs /dev/XXX

Upgrading XServe (2009) Drive Modules

Lately i thought it’s a good idea to reuse the old XServe 2009 Model (only capable of running OSX up to 10.6) as a VMWare Sphere Host. But this model has just one harddrive installed in an ADM (Apple Drive Module) with a capacity of 80 GB.

I grabbed a 2 TB Western Digital green harddrive and replaced the 80 GB drive in the drive carrier.

But the ESXI installer couldn’t find the drive :-(

After some online research i found a hint that the ADM only use 1.5 Gigabit Mode for Serial ATA. So i installed a jumper on position 5-6 on the Drive and voilà – it worked!

Vagrant and VirtualBox 4.3.10 not mounting /vagrant

seems to be a bug in VirtualBox 4.3.10, but there is a quickfix available. Do vagrant ssh and then:

sudo ln -s /opt/VBoxGuestAdditions-4.3.10/lib/VBoxGuestAdditions /usr/lib/VBoxGuestAdditions

Moving from Sublime Text 2 to Sublime Text 3

Screen Shot 2013-11-15 at 16.46.02As Sublime Text 3 is around in public beta for quite some time, i thought i upgrade from my 2.x version to the new and – as it’s written on their homepage – faster version 3.

Ross Lawley has a perfect guide how to upgrade painlessly:

And thanks for the hint to check the compatibility of the plugins first on this great page:


Steps how i upgraded:

  • download Sublime Text 3
  • install package manager in Sublime Text 3 by showing the console (view -> show console) and entering this text:
import urllib.request,os; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); open(os.path.join(ipp, pf), 'wb').write(urllib.request.urlopen( '' + pf.replace(' ','%20')).read())
  • using the package manager install all your (green) plugins you used on Sublime Text 2
  • copy and paste user settings (Preferences -> Settings -> User)
  • go to terminal and copy TM Themes, other settings and relink the commandline “subl” to the new version (i have ~/bin in my path):
$ cp ~/Library/Application\ Support/Sublime\ Text\ 2/Packages/User/*.tmTheme* ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User/
$ rm ~/bin/subl
$ ln -s /Applications/Sublime\ Text\ ~/bin/subl


Use multiple email addresses (SSH keys) with GitHub

There is a good tutorial on Gist that shows all the required tasks:

This post is to remind me how to do it 😉

Shairtunes (airplay audio client) on Mac OS X 10.7

Based on Thias blog instructions on building shairtunes for Mac OS X.

  • install XCode using AppStore on Mac OS X 10.7 (a AppleID is needed for that)
  • open XCode, in the Preferences “Downloads” click on button to download and install the Command Line Tools
  • Download and install Mac Ports (
  • Open Terminal and type:
$ sudo port install git-core libao p5-io-socket-inet6 p5-libwww-perl p5-crypt-openssl-rsa
$ sudo port install pkgconfig

install shairtunes as a damon:

$ sudo mkdir -p /usr/local/bin/
$ sudo cp hairtunes /usr/local/bin/
$ sudo vi /usr/local/bin/ # change the path of cli_hairtunes  /usr/local/bin/hairtunes
$ sudo cp org.mafipulation.shairport.plist Library/LaunchAgents/
$ launchctl load org.mafipulation.shairport.plist
$ launchctl unload org.mafipulation.shairport.plist # (to remove)


works only while a user is logged in! (on the login screen there is no shairtunes possible) consider using autologin for this mac (but be aware of the possible security risks!)

Sprache ändern