Very cheap and cool hack that will be finished-up quickly

 

What would be the best embedded HW platform for cool hack ?

this could be discussed for some times here.

But, let me, one more time talk about how nice are Arduino solutions as a building block way of creating your HW/SW hack.

To be completly honest, I only recently decided to look at it, and noticed the progress made compare to the ancient  time .

we had to program eprom, mount it on PCB, erase it with UV and more create interface circuit and all protocols to simply upload code on microcontrolers ! (ok this was around 1990 for me)

Here, the device  that I would like to present, is the following: Arduino nano v3 – atmega 328

 

HW presentation:

http://arduino.cc/en/Main/ArduinoBoardNano

Download SW here :

http://arduino.cc/en/Main/Software

 

- – - – - – - – - More to read here, hold the line !

Linux / Ubuntu SUN Java JRE valid installation

It happen that under Linux, I need with my browser a working java support , like a lot of normal penguin fan, with maximum java compatibility.

For this, I really prefer to have a standard Sun java JRE or JDK, but it doesn’t come pre-installed under my preferred ubuntu :-/

After having searched many time, a working procedure (forgetting how to, and searching again.. bla bla)

Here is the one that worked for me, for Ubuntu 10.04,  in a simple way this from original link :

 

First step will be to download jre-6u34-linux-i586.bin file, after having accepted the license !

http://www.oracle.com/technetwork/java/javase/downloads/jre6-downloads-1637595.html

then:

$ chmod u+x jre-6u34-linux-i586.bin
$ ./jre-6u34-linux-i586.bin
$ sudo mkdir -p /usr/lib/jvm
$ sudo mv jre1.6.0_34 /usr/lib/jvm/
$ sudo update-alternatives –install “/usr/bin/java” “java” “/usr/lib/jvm/jre1.6.0_34/bin/java” 1
$ sudo update-alternatives –install “/usr/lib/mozilla/plugins/libjavaplugin.so” “mozilla-javaplugin.so” “/usr/lib/jvm/jre1.6.0_34/lib/i386/libnpjp2.so” 1
$ sudo update-alternatives –install “/usr/bin/javaws” “javaws” “/usr/lib/jvm/jre1.6.0_34/bin/javaws” 1

open you firefox browser (no choice hu :) ) and have fun !

Directory md5 integrity check, and dummy remote backup principles

It might be frequent that for different needs, you want to verify the integrity of your data within a directory..

In the same way when you create or collect important data, that you don’t want to loose it (frequent attachment pathology of human being :) ).

 

I found this recursive md5 utility, file by file, in *command line* very usefull. Here also my example is base on exf windows program

because I used it with automation tool xstarter.

So.. exf do the job:

exf.exe -otf  c:\temp\md5_result.txt -r -d “c:\mydatadir” *.*

Then you get a digest file with all by file md5 fingerprints.

Hum..suddenly you want to compare if any changes  have been done to you previous copy of this archive of

if any file did change so what you need is to compare to this digest file list to the previously saved one.

c:\temp\md5_result.txt  can be simply compare with any tools but there is a small issue: 3 lines are updated with a time stamp that you can remove by using a command line tool like .. sed :

sed.exe –in-place 3d “c:\temp\md5_result.txt”

 

Now we can consider a very simple remote file synchronisation system based on fingerprints comparison.

Wait !! I know , I know, very good tools does exist to do remote data backup synchronisation, like the great rsync.

I want just to expose this simple mechanism, because it will work on a basic setup of server having a FTP tool where

the backup process acts completely passively on the remote server.

The advantage is that it is really widespread tools and setup.

Next time I will exposes test results of rsync usage :)

sed for windows

exf command line

My quick repack of required tools

Command line simple file comparison.. that works !

cmd line For different situation I had the need of comparing 2 file, mostly binary ones and start searching for on the shelve tool.

My constraint was Windows :) so we have the great fc.exe tool that is supposed to do the job.

Indeed I discovered after some times that my system using fc.exe in production did suffer from nasty bugs

After lost time searching on the web I decided to write a basic replacement tool sfc.exe that should work pretty much correctly.