Life as it is in Brockport, NY

20110808-073525.jpg

20110808-073536.jpg

Matéo et Zavier

Upcoming Sankofa concert preview shot

I had to go for option B.

FreeDNS, Synology NAS and crontab, Awesome!

I’ve just changed my domain dns service to FreeDNS and with the help of a little bash script, it will update from my Synology NAS which means I don’t have to have my box up all the time. This is great! I’ve setup cron to run it every 6 hour. For more information about cron you can check wikipedia.

#minute hour mday month wday who command
0 */6 * * * root /usr/bin/dnsactual.sh

Now that we have a cron working to run the script every 6 hours, let’s write the script. I’ve modified a bash script from FreeDNS that updates the dynamic ip if need be. Here is the code.

##############################################################################
# application name: dnsactual
# other files: dnsactual.conf (keeps the last updated ip)
# dnsactual.log (register date & time of the actualization)
# Author: Ernest Danton
# Date: 01/29/2007
# Modified by Benoit Beauchamp on 8/8/2010
##############################################################################

if test -f /etc/freedns/dnsactual.conf
then
CacheIP=$(cat /etc/freedns/dnsactual.conf)
fi
#echo $CacheIP
/opt/bin/wget http://freedns.afraid.org/dynamic/check.php -o /dev/null -O /tmp/ip
CurreIP=$(cat /tmp/ip | grep Detected | cut -d : -f 2 | cut -d '<' -f 1 | tr -d " ")
#echo $CurreIP
if [ "$CurreIP" = "$CacheIP" ]
then
# Both IP are equal
echo "Update not required..."
else
# The IP has change
echo "Updating http://free.afraid.org with " $CurreIP
wget http://freedns.afraid.org/dynamic/update.php?CHANGEMETOTHEPROPERKEY -o /dev/null -O /dev/stdout
echo `date` "Updating log with IP " $CurreIP >> dnsactual.log
fi
rm -f /etc/freedns/dnsactual.conf
echo $CurreIP > /etc/freedns/dnsactual.conf

You’ll have to change it according to your setting but the first thing that you will need to do in order to have it run properly is to make sure you have wget install. You can locate wget with the following command

> find / -name "wget"
/usr/syno/bin/wget
/opt/bin/wget

I used the opt/bin/wget in the script. You will also need to change the CHANGEME to your key that you can find on FreeDNS website located at http://freedns.afraid.org/dynamic/ under the Direct URL link.

So now that we have cron and a script installed. I can now connect to my subdomain of my choice from anywhere. It’s good to be able to call home without too much fuss. Easy isn’t it?

What’s on my Mind

A Foggy Day In Charlottesville

Thursday, April 2nd 2009 right after the last day of tech, the final dress, for the spring dance concert 2009 edition. It was a very surreal and out of the ordinary moment in the beautiful C-VILLE.

A Quick Fix for the Garmin Nuvi 350

After updating my garmin to the latest software/firmware, the Nuvi 350 couldn’t acquire any satellites signals. I googled and found a trick. Here are the steps that I took.

1- Start by powering off the unit
2- Make sure the antenna is in the open position
3- Press the bottom left screen while holding the power button to turn the unit on
4- When ask if you are sure to enter Maintenance mode, say Yes
5- Select diagnostics
6- On the diagnostics page, select the reset button, clear error report
7- Restart the unit

While I was still in maintenance mode, browsing for the options, it found a fix to the satellites. There you go, now that I know about the maintenance mode, I hope that searching for the satellites will finally get easier and faster. Might be dreaming but we never know…

Make Video about LEDs


MAKE presents: The LED from make magazine on Vimeo.

A cool, well produced and short video about a bit of the history of LEDs created by Make. It’s worth your time!

Books I Received, Hacking in Progress

Here is what I have received and which I plan on playing around with. I got 3 books that I’m really happy about. I received Getting Started with Arduino, Physical Computing: Sensing and Controlling the Physical World with Computers, and Making Things Talk: Practical Methods for Connecting Physical Objects.

Getting Started with ArduinoPhysical ComputingMaking Things Talk

I can’t wait to read them and to start hacking away. I have no experience in doing this kinda of stuff. I really hope they will help as I want to learn more about movement vs computer, how to make things talk to each other basically. Hopefully I’ll be able to post more updates along the way.

Viral Marketing at the Death Star Germany

Enough of this mumbo jumbo, this is just too funny!