2006-10-26

1... 2... Daaaaaaaashhhhhhhh!!!

Hej, it's been a while... How are yall doin'?
Mmmm soory I'm getting my US english back on track before going to Boston next week... Anyway, enuf said 'bout my life...

Recently I got a pretty annoying little problem. Some asshole, sorry, I meant some windows user thought it was nice to start a file name by "- ". Come on dude!!!
"- foo -" is NOT a good name for a file.
It is bad, in the sens of contrary to good! It is evil!!! Imagine the whole world as you know it collapsing in a trashing curse, life being wipe clean by tempest of acidic rainy winds... sort of...
Bad!

OK. So how does a Unix guy get around that a rename it, mv-it I should say, into something more reasonable, such as foo.txt for instance. Because - is the option thingy, see.

Easy when you know the trick, like swallowing a burning spear or a sharp curvy sword. Yes, if you know the damn trick!!!!
OK, ok, here it is: start the name of the file by ./ (telling basicaly that you want to act in the present directory, which actually is what you want...) so that you get something like mv ./-\ foo\ -.txt foo.txt and there you are.

I hate you, windows guy... but there is always, *always*, ALWAYS a solution in our Unix command line world...

2006-10-16

Setbacks in Debian land

Another 'reminder' post :
Allright, you're ready to install a Debian distro right from the internet... Things are going well until the program chooses the lan to install itself instead of your standard pppoe ADSL connection! Meaning either you didn't read the info displayed or your modem response to DHCP Discover is privileged... (probably both of them)

Ok, stay calm and wait for the end of the procedure.
pppoeconf will not be sufficient to save the day. You'll have to edit the /etc/network/interfaces, comment out 'iface eth0 inet dhcp' and add 'iface eth0 inet ppp provider . Bring up eth0... That's all :)

Ref: take a look at 10.6.1.6

2006-10-11

Chasing Orpie

Severe brain damage caused by windows left me naked with my debian box.

A. Statements :
Where have they put my calc.exe ?
aka No I don't feel miserable enough to use expr !
aka I don't want to use my cell phone either
aka besides, I don't want to compute square root with the basic operands with the previous methods

B. Encounter deep inside the land of the lost packages.
The first google rule stress that thou shall not seek in vain (at least with no time constraint). Imagine that you meet someone whose very first words are "Because the equals key is for the weak". How could you refrain yourself from falling in love ? Let's face it, the world would never be the same anymore.

By the way, Orpie is a command line scientific calculator using the RPN notation and a visual stack. The chances are high that you could snob all your coworker just like during the hp48 days! (Remember ? When you were the only one willing to lend his/her calculator knowing the awful truth. The world were divided between 2 classes : those who would/could not understand how to use it and those who already own one. Ah! Life were so simple back there!)

Help yourself, go and compile it ! It's here

2006-10-10

The infamous John Smith, the stream ripper...

Some time ago, Longwei shared with us how to record an episode of some monument (he said so) of the French TV in order to go out and have some beer with friends (there)...
Today I was confronted to almost the same issue: some friends of mine are doing a radio show in France on RadioCampusGrenoble, while I am willing to go and juggle in the juggling gathering her, in Copenhagen. The beauty of Internet let me stream the show, albeit at the correct time...

So. Here we go again, the same in color! Or rather the same without image.
To hear the stream I just connect to the website of the radio and use any kind of software which can do that (BeepMediaPlayer on Cafetière for example), to record it on a mp3 or rather ogg file we need something else, in the name of Streamripper... Sounds like a serial killer to me but it might be because I listen to too much deathmetal.

Then it is the same cooking:
- do a script with the correct parameterss
- edit correctly your cron table
- go out and toss some stuff in the air, try to catch it again or run faster than gravity bring it back...

Here comes the script:
#!/bin/sh
#duration in seconds

$TIME=$1
/usr/local/bin/streamripper http://live.campusgrenoble.org:9000/rcg112.m3u -l $TIME -a -A -m 15

Here comes my cron table:
30 21 * * * /home/hern42/scripts/rcg.sh 5400

I know it is some sort of a rip-off Longwei's fantastic work but, hey, his script didn't work out of the box for my radio show...

2006-10-08

Writing in Chinese ? 写汉语?

This post is more a post-it that a post !
Each time I upgrade my system or I install it again, I always forget how to configure the chinese input!

It's more than easy in fact, only few stuffs need to be installed and configure.

The best method for Chinese input is definitively scim, so first I need to install scim, scim-tables and scim-pinyin. Scim can also be used for other exotic languages, from japanese to tibetan. Scim is easy to use and very similar to popular input methods used in China with in Microsoft windows.

Once installed, I just had to modifiy my .i18n file in my home directory by adding four lines wich are used by X depending on the window you want to type in (GTK, QT or basic X). More information can be found on this website.

GTK_IM_MODULE=scim
QT_IM_MODULE=scim
XIM_PROGRAM="scim -d"
XMODIFIERS=@im=SCIM
Then, after I restart my windows manager and once back in, in order to switch from french/english/chinese I just have to use CRTL+SPACE