Fork me on GitHub
Mar 26 2009

A script to make sure that my IPv6 Tunnel is always on

1,750 views

I’m using an IPv6 tunnel using http://go6.net/, and when the internet connection goes down and up after a while, the tunnel just doesn’t refresh it self.
I run it on crontab for every 5 minutes for now :)
My Machine is Gentoo 2008, I guess you need to do some changes for it to work on your distro.
Hope that any one will benefit from it

  1. #!/bin/bash
  2. function restartGW {
  3.         /etc/init.d/gw6c restart
  4.         date >> /var/log/checkipv
  5. }
  6. stat="`/etc/init.d/gw6c status | tr -d ‘ ‘ | cut -d’:’ -f2`"
  7. if [ $stat == ‘stopped’ ]
  8. then
  9.         restartGW
  10. elif [ $stat == ‘started’ ]
  11. then
  12.         IPV4connected="`echo $(nc -zv www.google.com 80 2>&1) | cut -d’)’ -f2 | tr -d ‘ ‘`"
  13.         if [ $IPV4connected == "open" ]
  14.         then
  15.                 # check ipv6 connectivity
  16.                 IPV6connected="`echo $(nc -6zv ipv6.google.com 80 2>&1) | cut -d’)’ -f2 | tr -d ‘ ‘`"
  17.                 if [ $IPV6connected == "open" ]
  18.                 then
  19.                         exit 0;
  20.                 else
  21.                         restartGW
  22.                 fi
  23.         fi
  24. fi
  25. exit 0

Update:
This script is available at github on http://github.com/alaaibrahim/ala-scripts/.


Feb 25 2009

Formal Apology

1,755 views

When you do something wrong, use this form to apologize :)

Formal Apology

Formal Apology


Feb 24 2009

The Piano [Life is a Song]

2,451 views

This is the song “Comptine D’un Autre Ete” for the Musician “Yann Tiersen” from the sound track of the film “Amelie“.

I love this music, but I really enjoyed this video, I just wanted to share it with everybody else, enjoy!


Feb 16 2009

Merging

1,048 views

For a long time, I had two blogs, Gurus Place, and this one, as I used to separate the technical from the other stuff, the problem was that, sometimes it was a little bit hard to differentiate between, technical, and non-technical posts.
So I moved Gurus Place here, and did the 301 redirect here :)


Feb 15 2009

Designing the Future – The Venus Project

1,123 views

A Dream that can be made true, with everybody’s help

Also you can read more details in the pdf http://www.thezeitgeistmovement.com/DesigningtheFuture.pdf

The Venus Project


Feb 9 2009

Are you from the past?

921 views

The IT Crowd is one of my favorite shows, it became like an addiction to me, I can never get enough of it.
This is episode 1 from the first season, you can watch it, it’s on google-video.

Now, it seams that the “Are you from the past?” thing, is faced a lot in the IT world, it’s like either we are from another planet, or we live in a world, where idiots are main population occupying it.
We speak in simple matters, like turn on your computer, but people find it hard to understand.

People refuse to think for a second of what the error message told them, or worse, they refuse to read the error message, but they have an amazing skill of attracting viruses, worms and Trojans. It’s really amazing.

And do you know what the problem is? a lot of these people work in the IT industry, and other people might know them as Computer Experts.

Now the issue is always, how to communicate with them, of course telling them that they are stupid, is rude. But guess what is also rude, telling them to try to learn, or use google, or read the G** D*** F***** Message.
And believe me, they would never learn.

So what do you think? Anybody has any ideas?


Feb 2 2009

Unit test, making better designs

1,740 views

What I’m presenting here is an example for Unit tests making us change the design to make a better design for our application. Continue reading


Jan 13 2009

Gentoo Cache Mirror using apache and php

2,422 views

When you have more than one gentoo machine, a good thing to do to manimize the bandwidth usage, is to run some local mirrors, so that you would get the file only once, for all the machines.
Continue reading


Jun 26 2008

Shoo Hal Ayam? – A fund raising concert at Terra Sancta

1,065 views
July 5, 2008
7:30 pmto8:30 pm

Shoo Hal Ayam

Facebook link: http://www.facebook.com/event.php?eid=16764599499


Jun 3 2008

Ftp using curl

919 views

This post just a reminder for me, as every time I need it, I look through the manual for options, to send a file through FTP using the command curl


$ curl ftp://server/Path/To/Destenation -T FileToUpload -u username:password
 

I just keep forgetting it, hope it would help someone else :)