Category Archives: Uncategorized

Checking out webkit without test cases

So you want to check out webkit to do some hacking. If you already tried this, you know that the test cases folder is enormous.

Not enormous solely by its size (which may be somewhat tolerable), but by amount of files in there. That’s absolutely preposterous. I think that the ratio when I last canceled the checkout was something like 15mb of content versus 75mb of disk space usage. I think I used FAT back then. That means 60mb went just to store information about files. (These sizes of course do not ignore the duplicates in the .svn folders.)

It’s completely irresponsible that someone put those in the project root, where nearly all the subfolders are essential except those test cases.

So if we just want to try out stuff and play around without running test cases ourselves, we don’t want to check out this enormous folder and get stuck on this for half an hour, an hour, two or even more. Here comes svn’s –depth parameter. UPDATE: Note! You will want to double-check that when you copy paste the command line from this site, there is actually two dashes before “depth”. I’ve noticed that during copy-paste, they were replaced by a single line.

$ svn co http://svn.webkit.org/repository/webkit/trunk webkit --depth immediates
$ cd webkit
$ for i in `ls -d */ | sed 's/\///g' | grep -v Tests`; do cd "$i" ; svn update --set-depth infinity; cd .. ; done

  1. So, we checkout only immediate children-files for webkit and put them in webkit subdirectory. 
  2. Then we list only directories, (ls -d */) and remove all the appended slashes (sed ‘s/\///g’). We have one directory per line now. Finally we get only lines that do NOT include word Tests (grep -v Tests).
  3. Finally, we enter each directory, and tell svn to update, but now with infinite depth.
That’s it! You should now have a Webkit working copy.
Tested on Mac OS X 10.6 Snow Leopard, with Webkit revision 52487. YMMV, but I think this should work on any Unix including GNU/Linux. You can probably pull this off on Windows using Cygwin or even msys.

Updated on Aug 22 2012, primarily to update formatting.

Printscreen et al. on Macbook in Windows

If you’re bootcamping, you may have trouble issuing some standard keyboard commands. For example, Print screen. Because there’s no printscreen key on Mac.

To do printscreen, press Fn+Shift+F11

More information on other keys can be found at Apple’s knowledge base: http://support.apple.com/kb/HT1167.
Disclosure: Previously this page has read “Fn+Shift+F4”. I have no idea how I came up with F4. Mea culpa.

Mac and Debian … not a happy couple

Trying to insall Debian on Mac OS X. If you plan on doing so, familiarize yourself with following concepts: rEFIt, gptsync, MBR/GPT hybrid partition table. And .. prepare to reboot a few times. This is with Debian Lenny CD1 only; amazingly it has no gptsync in default install and its install is completely confused by Macs. Hopefully they’ve ironed it out in Squeeze a bit.

Turn on Genius in iTunes without credit card

Update (March 6th 2014): Numerous comments say this method works; added strikethrough over the previous update.

Update (April 1st 2011): Apparently this method no longer works. Try using it, but when I tried using it a few minutes ago on a friend’s existing Apple ID, it did not work. It might work when you create a new account. If it does, please come back and leave a comment.

If you try turning on Genius in iTunes, you’ll be prompted to create an account where in last step you need to enter payment information. If you don’t have a credit card follow these steps:

1. Instead of going to Genius, go to iTunes Store.
2. Try downloading one of free iPhone apps.
3. When you’re asked for account information, click Create account.
4. Fill out the forms as usual.
5. On last step, you can now choose None as payment method (as opposed to creation through Genius).