I’ve recently decided to start developing on the iPhone platform. I wanted to share here all links and resources I found to get started.
iPhone applications are primarily written in Objective-C. Get more information about this language on Wikipedia.
Basically, Objective-C is an object-oriented programming language which adds Smalltalk-style messaging to the C programming language.
On the excellent Pragmatic Bookshelf, you can find books and screencasts such as :
Introductions, tutorials and examples I found around :
I also found a lot of excellent resources on iTunes-U:
I didn’t read all these books, I’ve just selected books with a good rating.
I hope you find these resources useful. Next articles will deal with iPhone development.
This entry was written by , posted on April 10, 2010 at 11:02 am, filed under iPhone. Leave a comment or view the discussion at the permalink.
I’m starting a new iPhone category in this blog.
The first post is about a game I’ve just installed : Doodle Jump.
Be aware, it’s addictive
I’ll share here applications I like on iPhone.
This entry was written by , posted on March 17, 2010 at 12:15 pm, filed under iPhone and tagged iPhone game. Leave a comment or view the discussion at the permalink.
I regularly use the find command in scripts to clean directories on my servers.
The common way to use find to do this is to write something like:
find ./my_dir -name 'cache-*' -exec rm -rf \{\} \;
It works fine but it always outputs messages like this:
find: ./mydir/cache-001: No such file or director
which can be annoying when ran in a crontab.
I just found recently that using the option ‘-delete’ with find just fix this problem.
find ./my_dir -name 'cache-*' -delete
This entry was written by , posted on February 4, 2010 at 11:36 am, filed under Command line and tagged find. Leave a comment or view the discussion at the permalink.

This is the default output of the munin load plugin.
I’ve patched it to add a permanent blue line indicating the number of cpu of the server. The resulted graph looks like this :

You can download the patched plugin here. It is tested with Linux and FreeBSD.
This entry was written by , posted on December 3, 2009 at 12:21 pm, filed under Monitoring and tagged load, munin. Leave a comment or view the discussion at the permalink.
Just found this very good article about optimizing servers.
This entry was written by , posted on October 12, 2009 at 1:20 pm, filed under Optimization and tagged ionice, nice, ulimit. Leave a comment or view the discussion at the permalink.
I needed a script for a quick health check of a bunch of servers.
This is how I did it using the ping command:
for((i=1;i<42;i++)); do
ping -c 1 -W 3 host${i}.domain.com &> /dev/null
if [ $? -ne 0 ] ; then
echo "host${i} is down"
else
echo "host${i} is up"
fi
done
You can also use netcat and check a specific port:
netcat -z -w 2 host${i}.domain.com 80 &> /dev/null
This entry was written by , posted on August 14, 2009 at 1:46 pm, filed under Command line and tagged loop, netcat, ping. Leave a comment or view the discussion at the permalink.

I wrote previously a how-to to set your iTerm tab title.
I finally found a tool to do the same thing with the default Mac OS X Terminal.
Check it out here, it works perfectly for me!
This entry was written by , posted on August 11, 2009 at 2:12 pm, filed under Command line and tagged shell, terminal. Leave a comment or view the discussion at the permalink.
The default value of “Reserved block count” takes 5% of usable disk. On a large fs like 813G, it represents about 40G.
These blocks are reserved to the super user to recover from situations where user processes fill up filesystems.
It is absolutely safe to reduce this space to one hundred or so MB.
$ df -h /dev/sda4 /dev/sda4 813G 418G 354G 55% /home
Before the tuning, we have 354G free.
$ tune2fs -l /dev/sda4 ... Reserved block count: 10816865 ...
Change this number to 20000.
The blocksize is 4096, 20000 blocks represent about 80MB.
$ tune2fs -r20000 /dev/sda4 ... Reserved block count: 20000 ...
$ df -h /dev/sda4 /dev/sda4 813G 418G 395G 52% /home
We now have a gain of 40GB of free space!
This entry was written by , posted on June 30, 2009 at 9:55 am, filed under Optimization, Uncategorized and tagged filesystem, tune2fs. Leave a comment or view the discussion at the permalink.
If you need to sum the total size of files in a directory or matching a pattern, an easy solution is to use awk.
I needed to calculate this total for a set of javascript files, I used this command line:
$ find App/ -name '*.js' -exec ls -l \{\} \; | awk '{sum+=$5} END {print sum}'
1929403
For a human readable result, you can divide your result and use printf to format it:
$ find App/ -name '*.js' -exec ls -l \{\} \; | awk '{sum+=$5} END {printf("%.2fM\n", sum/1024/1024)}'
1.84M
This entry was written by , posted on April 17, 2009 at 11:12 am, filed under Command line and tagged awk. Leave a comment or view the discussion at the permalink.
server {
server_name domain.com;
rewrite ^(.*)$ http://www.domain.com$1 permanent;
}
This entry was written by , posted on March 20, 2009 at 7:12 am, filed under http and tagged nginx. Leave a comment or view the discussion at the permalink.