/var/log

Multiple Xcodes and iOS simulators

When upgrading Xcode, it wil overwrite the old one including the iOS simulators. To install an old version of Xcode: Download the .dmg from the Apple devcenter. Open this package so you see the Xcode.app. Create a directory for this Xcode version, e.g. /Applications/Xcode6.4 or some other name. Put the Xcode.app into this new directory. […]

Sami - a PHP API documentation generator

I recently was looking for a way to create clear and nice looking API documentation from a library I made (BSF GitHub and API docs). I looked into phpDocumentor 2, apigen, doxygen and Sami and decided to go for this last one. It has a real nice looking default theme and is themeable with twig. But […]

VIM tips

Here I will collect some of the actions I always have to look up before I can use them in VIM... Replace in selection Get into visual mode (CTRL + V) and create the selection Type : - you'll see '<,'> which is the range After this range, type for example s/fuction/function/g to replace every occurance of "fuction" […]

Github gh-pages and master

I often create a gh-pages branch for my Github projects as a simple website for the master branch. These are the commands to keep gh-pages up to date with the master branch and push everything to the remote: # In master: git add . git commit -m "A commit" git push origin master git checkout […]

Android nine patch

The left and top guidelines tell the framework what can be stretched, the right and bottom guidelines tell it which rows and columns are padding (actually, the area where the inner content can go).

Catch errors in Promise

When using the static resolve() Promise method, you often see code like this: Promise.resolve(func()).then(function(result) { console.log("Ok for: " + result); }).catch(function(error) { console.log("Error: " + error); }); console.log("Some code running after Promise.resolve..."); Everything is ok when the func() function has no errors: function func() { return "OK!"; } Output: Some code running after Promise.resolve... Ok […]

Titanium switch in listview item

I was using a listview with rows that had a label and a switch element. The switch element could be turned on or off and new items could be inserted into the listview. When new items where inserted I just replaced all items. This was giving me some nice surprise, as the value of the switch […]

Arch Linux

Arch Linux is really a great desktop distribution, especially for older hardware like my Asus Eee pc 1015PEM netbook. Windows 7, the OS originally installed on this netbook, is very slow and even Xubuntu is not very fast, though faster than Windows 7. To install the distribution you have to execute some commands in the […]

Checking in an existing project in SVN

Create the directory in the repository. Check it out somewhere (NOT in your local working directory). Move the .svn directory to your local working directory. Add all folders an files. Commit.

Titanium fireevent and bubbling

In iOS events bubble up from child to parent view by default, but in Android you have to explicitly say so. For example if we have a parentview that adds a childview that has a button in it. After clicking the button, the childview fires a "logout" event on the button. The parent view listens […]