Monthly Archives: February 2013

Computer and IT Quiz

Recently I started contributing to this fun Computer and IT Quiz app on Android:

Android app on Google Play

Mike Heyworth created the original app, I contributed mocks and elements for the new design, which Mike incorporated in the latest version of the app released just a few days ago. If you are in IT, do try it out, challenge yourself, test your skills, and just have fun with it!

If you like this FREE app please do buy the PRO version and support us!

More usability and design improvements will be coming soon (1-2 months), so stay tuned!

 

Setting default device in R in Mac OS X

On Mac OS X, for some reason the default device for displaying plots is Quartz. This can be inconvenient, since for example the savePlot function works only with X11 devices with Cairo support.

To change the default device, I created ~/.Rprofile like this:

setHook(packageEvent("grDevices", "onLoad"),
    function(...) grDevices::X11.options(type='cairo'))
options(device='x11')

The setHook creates a hook so that when the grDevices module is loaded, it sets the default type of X11 devices to cairo.

The second line sets the default device to X11.

Both of these lines are necessary, otherwise the default device would either not be X11, or it would not be the correct X11 type.

Subversion does not remember or update my password

I had this strange issue the other day. My account password has recently changed, and for each Subversion repository linked to that account I had to re-enter my password. Normally it is enough to re-enter once per repository: Subversion updates the corresponding authentication setting file so that I don’t need to enter it again. But for some repositories it kept asking for it…

After some digging around, I realized that my user did not have write access to the file that sores the password. That is easy to fix once you know what to look for, and if you know which file it is. However that can be tricky if like me you don’t know how Subversion organizes its settings files…

In Windows 7 (using the Git shell) you can find your Subversion setting files that you don’t have write access to like this:

find /c/Users/YOURUSER/AppData/Roaming/Subversion ! -perm -200 -type f -ls

This can be useful to confirm your suspicion about filesystem permission issues. You can add back your write permission with the command:

find /c/Users/YOURUSER/AppData/Roaming/Subversion ! -perm -200 -type f -exec chmod {} \;

If you are really lazy to type all that, you can simply add write permission to yourself on all files in the Subversion directory with:

chmod -R u+w /c/Users/YOURUSER/AppData/Roaming/Subversion

How did it happen that my write permission has disappeared on some of the files? I haven’t the foggiest idea…