2006-08-30

Reload me up, Scotty!!

Mysql, php and phpMyAdmin is some sort of a power trio, they don't play heavy rock but they do rock!

Except that it took me 2 days and 3 minutes (the 3 saving-my-life-and-sanity minutes were on a gtalk with longwei, a specialist, he did *all* the mistakes before me...) to be able to add a user with the right privileges to some tables... It took me the same 2 days and 3 minutes to be able and get to kick off the awfully insecure "root/no password" connection and have a normal user with a password, all that because of what?

All that because of what?

All that because you have to push the "upload mysql" button (or the equivalent in command line: mysql_reload(MYSQL *mysql) if you are doing it in a xterm somewhere lost in the matrix) for your changes to be taken into account. You dumb stupid piece of worthless dungworm crap!!!

So now I can start designing my wonderful php websites, with user interface and sessionning and everything. By the way, not to forget to say it somewhere, php is secure by default, so you cannot pass variables in urls (like in foo.php?var=bar&var_bis=foobar) unless you specifically ask for it.
Meaning you have to edit the php.ini somewhere (/usr/local/etc/ for freeBSD users, the hell if I know where it is if you use something else...) and put register_globals=On where it should be!!! Fortunately I already did the mistake several times before, so I didn't lose *so* much time with it...

[sigh]
It is a hard 'prentice_nerd life...

---
For the not-so nerd, the pun in the title is from Star Trek (the first TV serie where they wear pyjamas...). "Beam me up, Scotty!" was the original line... But as I am not a nerd in the Star Trek way, it is also and most importantly a song from grindcore band from Belgium: Agathocles, on the album Humarrogance from 1997, those were the days...

2006-08-27

The Cursed scanner of Doom and Death, from the fire legions of Hell...

I had a few troubles with my MacBook (namely Ghoul, after naming it Zombie to be laughed at by a friend of mine, a mean friend of mine, who told me she didn't know I was such a big fan of the Cranberries, damnit) and my Epson F3200 scanner. This scanner is my (well, one of my...) arch-enemy, it is responsible for many sleepless drunky nights... Anyway, apart from being obviously spawned by hellish creatures to torture me, it is a great scanner and it does good what it is supposed to do, scanning negatives... when it does it.

I thought he on a Mac it should be piece of cake to use that, what with Mac being the instrument of choice for all graphic designers, digitalphotographers and other artistic beings... Yes. But...

I bought the scanner in january this year, I bought Ghoul (shutup Charlotte!!) in august this year. In the mean time Mac had gone to Intel architecture, the install CD in the scanner box was still on a previous incarnation of osX... And no, I didn't think about upgrading that on the Net before cursing all my ancestors (and a few more) because I was such a loser, etc.

So...
I went to espon.com and fiddled around a bit to get the new version of the F3200 stuff, made for the Intel Macs. I installed it after another swearing part (because it comes in a .sit file for which I didn't have the extractor, and I had to install that as well, jeez, why not a good old tar.gz huh ?...) and now, thanks to the help of a third party software: SilverFast (something german, it ought to be good, or at least square!), I can start again my scanning activities... Oh joy!

After one test scan I wanted to edit the picture with the Gimp, which I installed courtesy of DarwinPorts, only to be yelled at by the Ghoul... Somehow even if I was running X11 (as I always do, hey, don't look at me that way!!) the display thingy option bugger didn't seem to fit... I was saved by a BSDist and add the following line in the .profile file:
export DISPLAY=:0 gimp
And now all is well and the sheeps are well garded (doesn't make any sense?, it's OK, it is a french idiom).

Sometimes I think, but most of the time it's too late...

Toward FreeBSD Step #2

Finally, at 1am I had (thanks Arno) the bright idea to have a look in my motherboard box (hidden somewhere in the mess where i never go) and I found the power plug for my hard disk.

I did the install from ftp, everything ran smooth...until reboot...I have a back partition table... in fact I did a wonderful mistake where I created the Slices... Next time I will read the docs, hmmm, but it was late !

After a second try this morning, I was impressed by the speed of the boot sequence (of course I've only few stuff installed) and I finally log on my new freeBSD box.

Next step is the install of Xorg and other stuff as well as final configuration.

2006-08-26

Toward FreeBSD Step #1

Today was a nice and windy August-sounds-March day... I got up early, downloaded the FreeBSD install CD.

I had a bike ride to the Chinese computer market and bought a new hard disk to put BSD, got a 300G for 80€ in SATA II. Ok my motherboard will only run it in SATA1 but, it was cheaper in II than SATA I.

Everything was fine, except that! And of course, I am not in Shanghai, it's 10pm, no way to find a shop open!

Here is the conclusion of the first step on my way toward FreeBSD, I am stuck on a hardware brainware problem...

2006-08-24

Contacts and film rolls

Once we have scanned many film rolls, it's great to have web pages with thumbnails and browsing features. for this, Bins is your friend ! It's a command line web album generator. It's great, easy to use with nice templates... The scrip bellow is useless, it's a just a batch for bins album generation on resized pictures (with convert command from imagemagick) copied to my www directory.


    [barth@localhost script_images]$ cat make_web_bins.sh
    #!/bin/sh
    export LANGUAGE=en_GB:en_GB.UTF-8:en
    cd $1
    mkdir tmp
    for i in `ls *.jpg | grep -v _s.jpg`
    do
    dest=${i%.jpg}_s.jpg
    if [ ! -s $dest ]; then
    convert -geometry 60% $i $dest
    echo $dest
    fi
    done
    mv *_s.jpg tmp
    bins tmp web_nb$1 -s joi
    rm -rf ~/public_html/photosweb/photos/web_nb$1
    mv web_nb$1 ~/public_html/photosweb/photos
    rm -rf tmp


Bellow an example of the result.


2006-08-23

Scan ta face

Hmmm, I've just bought a new scanner, a 250€ Epson Perfection 4490 to replace my old Epson 1240U Photo. Was it a good idea ?

First, as some readers might wonder why I am choosing Espon again? There is only one answer, Epson, through Avasis release open source drivers for most of its scanners.

Ok, after 2 minutes of web search and a quick rpm -Uvh iscan-2.1.0-1.c2.i386.rpm, here I am for an unprofessional test.

I've took a negative film, black and white and realised two series of scans. 1200 dpi and 2400 dpi with and without unsharp mask on both scanners.

No comments !














1240U @ 1200dpi




4490 @ 1200dpi



1240U @ 1200dpi + Unsharp




4490 @ 1200dpi + Unsharp

















1240U @ 2400dpi




4490 @ 2400dpi



1240U @ 2400dpi + Unsharp




4490 @ 2400dpi + Unsharp


2006-08-22

Have a beer and don't miss "Plus belle la vie"

How nerding can save your brain and help you to loose few brain cells ?

In 1998 was launched one of the best ever french TV serie, the unforgetable "Cap des pins". Unfortunately, this was stopped quickly and we, poor frenchies, had to wait until 2004 to discover "Plus belle la vie", its best sucessor.

Unfortunately it's on air every week day on France 3 TV channel at 8:20 pm which is not a reasonable time, even for a nerd stuck to his keyboard, especially when one of the several Arnaud of mine is offering a beer, "there", out in the real world.

So what, miss a beer or miss this delicious inside black hole, result of 30 minutes of brain tv wash ?

And someone invented recordings....

You need :
  1. a somehow TV capable device with composite output and sound output
  2. a video card with a composite input and sound card with line input
  3. a physical friend and a beer waiting for you outside
  4. mencoder
How to proceed :

A/ Create a nice script to record and encode the Tv output. It takes as input the name of output and recording duration. Mencoder is fun and uses nice parameters uh!
    [barth@localhost scripts]$ cat record_tv.sh
    #!/bin/sh
    if test -z "$2"; then echo "usage: record_tv.sh outputfile durationinsecond"; exit; fi

    #name of output
    NAME=$1

    #Duration in seconds
    TIME=$2

    #Where to put the stuff
    OUTDIR="/home/barth/videos/tv_recordings/"
    OUT="$OUTDIR/$NAME"

    mencoder -tv norm=0:input=1:driver=v4l2 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=900 -oac mp3lame -lameopts cbr:br=64 -vf pp=lb -endpos $TIME -o $OUT tv:// > /dev/null
Just one comment, take car to redirect the output of mencoder to /dev/null or a file. This is necessary otherwise, the next step won't work (seems cron doesn't like verbosity)

B/ Edit your crontab to launch recording script on time and during 45 minutes (2700 seconds)
    [barth@localhost scripts]$ crontab -e


=> This opens a nice vi, where we can edit le jobs to be launched!

    20 20 * * * /home/barth/softwares/scripts/record_tv.sh plusbellelavie.avi 2700


Check the crontab by

    [barth@localhost scripts]$ crontab -l


C/ Don't forget to set up you mixer setup

D/ Select the right TV channel on TV set and go out !

2006-08-21

The B-Team almost complete

Apparently everything works fine and the :wq! team is almost complete...
There is going to be some serious nerding going on!

First post on :wb!

And let there be light!