Hot Corners

Did you know, that you can trigger your HotCorners with a modifier key?




Posted in computer | Tagged , , , , , | Leave a comment

Disabling vibrate on new mail (iOS)

In iOS 6.x you can go to
Settings -> Sounds -> New Mail
And then on the top you can find a button for vibration and set it to none there.

Posted in computer | Tagged , , , , | Leave a comment


I just figured out, that I want to make sure, that I never committed a key to my repository before publishing it, so what’s the easiest way to grep throw all commits in a git repository:

$ git grep USERNAME $(git rev-list --all)

If you are only interested in the commits you can run:

$ git log -G USERNAME


Posted in computer | Tagged , , | Leave a comment

Finding the right LaTeX packages

If you have little space on your machine and therefore want to install the LaTeX Basic package (which is only around 150MB instead of a couple of GB) you might run into problems that packages are missing but with tlmgr this is quite easy to solve:

You might get errors like this:

I couldn't open style file alphadin.bst
---line 222 of file bachelor.aux
 : \bibstyle{alphadin
 :                   }
I'm skipping whatever remains of this command
I found no style file---while reading file bachelor.aux
(There were 2 error messages)
/usr/bin/texi2dvi: bibtex exited with bad status, quitting.

or similar. You can easily search for it with

tlmgr search --global --file alphadin.bst
din1505: texmf-dist/bibtex/bst/din1505/alphadin.bst

–all is a nice search flag as well

PS: Installing works with tlmgr of course as well

Posted in computer | Tagged , , , , , | Leave a comment

Mission Control

To get mission control to pop up fast just write this to your plist file:

defaults write expose-animation-duration -float 0.1; killall Dock

And with

defaults delete expose-animation-duration; killall Dock

you can get back to default setting.

Posted in computer | Tagged , , , , , , , , | Leave a comment

Mac OS X is updating your preferences in the background

Recently I noticed that a config file of Safari gets updated every now and then even if Safari is not running. The same goes for a configuration file:


These two files are not directly readable with e.g. cat but you can execute:

$ defaults read /Users/hashier/Library/SyncedPreferences/

To see what they give you. You can see all your open tabs on all your iPhone, iPad, iMac, MacBook etc devices that support Safari Cloud Tabs. The other file reveals other system preferences that get synced over the cloud like some settings from Apple Mail. Just have a look and poke a bit around.

Posted in computer | Tagged , , , , , , , , , | Leave a comment

Who opens my UPnP ports?

Recently I turned on UPnP (Universal Plug and Play) to play a bit with it and instantly noticed that someone/something opened some ports in my router and forwarded them to my machine. So of course I wanted to know what’s going on on my network. First idea “wireshark” but this only gives you information from which port these UPnP stuff goes, it doesn’t tell you the application that initiated these packages. For the curious here is the filter you can use:

udp.dstport == 1900 && http && ip.addr ==

UPnP uses the SSDP protocol which isn’t implemented by wireshark but you can simply use the http protocol because SSDP is based on HTTPU (yes, HTTPU).

<Imagine a picture that shows you that port 4500 and 5353 are open>

So port 4500 and 5353 (both UDP) are forwarded to my Mac but which software is behind this? Strangely

$ lsof -i :4500
$ lsof -i :5353

Booth show nothing but with a small trick we get around this. In a different terminal we use the ncat command (which you can install with homebrew) with

$ ncat -u 4500

and when we now call again the lsof command we can see which program is causing it

$ lsof -i :4500
ncat    57954 hashier    5u  IPv6 0x9fa0d8326998071f      0t0  UDP localhost:49850->localhost:ipsec-msft

$ lsof -i :5353
ncat    57960 hashier    5u  IPv6 0x9fa0d8326998071f      0t0  UDP localhost:49851->localhost:mdns$

We cann see that ncat is making a connections on UDP to localhost and the programs which are “answering” those requests are: ipsec-msft and mdns. This raised an eye brow because I didn’t do anything with vpn or IPsec so I started googling and found this nice apple page which explained to me which services forward those ports and apparently it’s just “Back to My Mac” and some “Bonjour” stuff.

– Removed a typo, of course I don’t want ncat to listen, so I removed the -l flag
– Why do we do this with ncat anyway? Sometimes the service is not started until a package arrives on the given port number and we create a udp package to that port number and then the service get’s started. If we don’t do this we just won’t see anything running in lsof.
– Typo

Posted in computer | Tagged , , , , , , , , , , , , , , | 4 Comments


A simple LD_PRELOAD tutorial that works under Linux can be found here but to be able to use it under OS X you should also read this.

Posted in computer | Tagged , , , , , , | Leave a comment


Just a list of comics and links I need from time to time:

German is not allowed into America because of some stupid paper work

Doctor is not allowed into the UK because he draws comics

Apparently Canadians don’t think that young people can be smart

1. Added links as hyper-refs

Posted in universal | Tagged , | Leave a comment

Script to automatically login to UpUnet-S at Uppsala University

If you want a small bash, zsh or shell script that auto authenticates you with Uppsala Universities UpUnet-S you can use this simple one liner, just add our username and password and up you go:

curl --data "action=Login" --data "usergroup=UpUnet-S" --data-urlencode "username=YOUR_USERNAME" --data-urlencode "password=YOUR_PASSWORD"

If you are a student at SLU you can try to substitute “usergroup=UpUnet-S” with “usergroup=SLU” and it should work for you as well. It’s untested though.

Posted in computer | Tagged , , , | 7 Comments