Blog Posts
Printing a sequence of letters or numbers
Shell Tips
January 14, 2008 | COMMENTS

Some times, while scripting in your favorite shell (I mean Bash !! 😃 you need to print a sequence of letters or numbers. Don’t write it yourself ! Script it using seq or curly braces !

nicolas@macvin:~$ seq 1 10
1 2 3 4 5 6 7 8 9 10
nicolas@macvin:~$ seq 0 2 10
0 2 4 6 8 10
nicolas@macvin:~$ echo {1..10}
1 2 3 4 5 6 7 8 9 10
nicolas@macvin:~$ echo {a..g}
a b c d e f g

Hope this will help you while doing a loop or building some hash directories :

nicolas@macvin:~$ mkdir -p test/{1..10}/{1..10}

Enjoy !

How to flush DNS Cache in Mac OS X ?
Shell Tips
January 3, 2008 | COMMENTS

Joy ! I just get my new [Mac Book Pro][1] (2Go RAM / 2,4Ghz Core 2 Duo / 160Go HDD / etc.). So I’m playing a lot with [VMware Fusion][2] and multiple host (debian, ubuntu, solaris, windows, etc.) with a great fluidity ! A big improvement for me who was working with an old DELL Laptop with 1Ghz Celeron and 512Mo of Ram...

But, while playing with my new laptop and my multiple virtual instances I needed to flush my DNS Cache. So, here come the tips :

With Mac OS X <= 10.4 :

macvin:~ root# lookupd -flushcache

With Mac OS X > 10.5 :

macvin:~ root# dscacheutil -flushcache

Cheap SAN and secure backup solution for small-sized platform
Shell Case Study
November 26, 2007 | COMMENTS

Here is a quick post about a cheap SAN and secure backup architecture solution for small-sized platform (5/10 servers). In this study case we will see how to use Network Block Devices (nbd) and soft-raid with mdadm. I design it for my personal web platform which is a small one. Last day, I was missing of free space on my backup server and I was angry by the idea to rent a most expensive server to store my backup while I had lot of unused space on my other servers.

1. Initial platform
2. New platform
3. How to do it ?

Continue Reading
[PHP] Zend Platform - Performance results
Case Study
November 12, 2007 | COMMENTS

If you are a PHP developer or a LAMP server admin you probably have already heard about the [Zend Platform][1]. After some test and configure/tunning step, we deployed this solution on a heavy loaded production server running with [Apache 2.x][2], [PHP 4.4.x][3], [MySQL Client 5.x][4].

Continue Reading
Bind 9.5.0 - Patch dlz MySQL 5 for auto reconnect
News Tips
September 4, 2007 | COMMENTS

Here is a quick post of a "quick and dirty" patch for the [ISC DNS][1] Server : Bind 9.5.0a6 and its dlz mysql driver. For the quick story, I was using [Bind][2] 9.4.1 with dlz MySQL. My [MySQL][3] server is a 5.0.41 (with [solidDB][4]). While using it, I realize that some times the dns server was returning empty value for the dns queries. I tried many tips but it was still (sometime) giving me empty answer... Of course, I suspected the dlz driver. So, I tried to upgrade to Bind 9.5.0a6 but the problem still happened and the only way to fix was to restart bind !

Continue Reading
  • ...
  • ...