In a Ruby on Rails app, I wanted a list to be at least of two items. This could be done in several ways. Here is a first naïve impementation: # Naïve implementation, just return whatever number I need def sum_up_a(existing) return 2 if existing == 0 return 1 if existing == 1 return 0 end […]
Somebody asked me if it’s possible to change history of an SVN repository like you can do in Git. The easiest parts to change are: commit date commit log message With this, you can easily modify time stamps if, for instance, your svn server clock is wrong. Step 1: Modify repository to accept property changes […]
Easter egg CSS circles Mar 29
Easter eggs instead of circles on your CSS. It’s easier than I thought.
After my harddisk crashed and I reinstalled the machine recently, I misconfigured my Git to set EMAIL as email address. This made Git history look horrible, with incorrect email, image. By accident I even wrote an incorrect name at one point. Note the missing image. Now it turns out my git repository was full […]
My iPhoto library with 6000+ family photos was running slow on my macbook. So I looked for performance tuning tips on the net. Here are the adjusted tip, which works for me. This Apple support thread mentioned 3 tips: Upgrade RAM Turn off visual bling in overview pages Vacuum iPhoto database file Could not do […]