Home + Sharp + return
The shortcut that I never remember:Esc + # (Meta + #)
With Bash, comment the line and go to next line
58 hits / 0 comments
Sat Mar 22 15:19:02 2008 -- By: ludovic Bellier
Very Simple Test Download via a Proxy Howto
This simple howto explains howto to check your download rate through a ft proxyprivate Proxy
=============
If it's a private proxy, first create a tunnel to this proxy with ::
ssh -l
Next, configure your proxy::
export ftp_proxy=localhost:3128
Finally, test your dl with wget::
wget --verbose --proxy=on \\
ftp://ftp.free.fr/mirrors/ftp.ubuntu.com/releases/7.10/ubuntu-7.10-desktop-i386.iso
You can check if your traffic uses the proxy with iftop, example::
iftop -i eth0
public or internal Proxy
========================
You just set your proxy host/port and launch wget::
export ftp_proxy=localhost:3128
wget --verbose --proxy=on \\
ftp://ftp.free.fr/mirrors/ftp.ubuntu.com/releases/7.10/ubuntu-7.10-desktop-i386.iso
166 hits / 0 comments
Sun Nov 18 23:00:13 2007 -- By: ludovic Bellier
Navibe GM720 : setting and using with Linux
I recently buy an USB GPS, also called GPS Mouse, Navibe GM720 on eBay. I'll use it with Linux on my Apple iBook G4.
Hardware
GPS
The Navibe GM720 uses a USB-to-Serial converter from Prolific. The GPS chipset is the SiRF Star III, a recent and famous chipset used in numerous current GPS receivers.

Computer
I use an Apple iBook G4 with Gnu/Linux Gentoo PPC distribution. This 12" iBook is small enough, I can put it in a back bag and the battery allows 3-4 endurance hours.

Setting
Hardware ID
lsusb only shows the USB-to-Serial converter:
# lsusb Bus 003 Device 002: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
cgps reports: SiRF binary GSW3.2.0PAT_3.
Setting an USB GPS with Linux
A lot of these (all?) USB GPS use the Prolific USB-to-Serial converter. So your kernel needs the pl2303 driver.
Linux kernel setting (here v2.6.23-rc1):
Device Drivers ---> [*] USB support ---> USB Serial Converter support ---> <M> USB Serial Converter support <M> USB Prolific 2303 Single Port Serial Driver
When you plug your USB GPS, you see in /var/log/messages:
Jul 29 17:23:40 iyn usb 3-1: new full speed USB device using ohci_hcd and address 3 Jul 29 17:23:40 iyn usb 3-1: configuration #1 chosen from 1 choice Jul 29 17:23:40 iyn pl2303 3-1:1.0: pl2303 converter detected Jul 29 17:23:40 iyn usb 3-1: pl2303 converter now attached to ttyUSB0
If none, verify if the pl2303 module is loaded, with the command lsmod:
# lsmod | grep pl2303 pl2303 21956 0
If none, the command:
insmod pl2303
loads the module.
You see that the GPS can be accessed with the ttyUSB0 serial device, so I'll use the /dev/ttyUSB0 device name.
Using
Verify you can access your GPS
The gpsd suite has the sirfmon utility which communicates with the GPS through the serial port (or through gpsd, see below).
Starts it with:
sirfmon /dev/ttyUSB0
This software displays on top the informations received from the GPS and on bottom the raw communication with the GPS.
GPSd
The gpsd daemon is an abstraction layer. It communicates through the physical serial port GPS and offers services (lat, long, ...) to its clients (cgps, sirfmon, gpsdrive, navit, ...).
A lot of Linux applications use it, and it is ported to Open/Free/NetBSD and Mac OS X.
It's very simple, just start the daemon with
gpsd /dev/ttyUSB0
If you want to kill it, use the killall gpsd command.
FYI: gpsd installs the usb hotplug rules.
The gpsd suite has a lot of very usefull tools.
Gpsd tools : sirfmon
sirfmon is a SiRF Star III chipset specific tool, it displays a lot of advanced information from this specific chipset class GPS. It'a a textual tool.
Start gpsd if not yet done, and just:
sirfmon
and sirfmon will use gpsd to get geographic informations, see this Sirfmon screenshot:

Gpsd tools : cgps
cgps is also a text tool which displays useful geographic informations, but it isn't specific to one chipset class GPS. See this cgps screenshot:

Gpsd tools : xgps
It's same as cgps but with a graphic interface.
Gpsd tools : cgpxlogger
cgpxlogger is a gps data logger, it displays GPS informations, in GPX format.
Use example:
# cgpxlogger > 2007-07-29_20h08.gpx
and Ctrl-c stop it.
GPX is one of the most known gps data logger format, a lot of applications use it. It's a good solution if you want trace your way or help the OSM project.
GpsDrive
gpsdrive is a car navigation system for laptops. It can download maps from Expedia or TopoZone. See this Gps Drive screenshot:

OpenStreetMap
OSM is a collaborative editable map. Most of the current maps have restrictive rights, this project allows each person with a GPS to upgrade the OSM map. Some softwares (like Navit) can use this non-commercial Map. See the current OSM Map.
iBook with Gentoo and GPS use
/etc/init.d/pbbuttonsd stop deactivates the suspend to ram process, when you close your laptop or after 5mn of inactivity, so you can log your GPS way with cgpxlogger, and import it to OSM.
Thanks
gpsd developers, Gwenn, Jkx.
864 hits / 0 comments
Sun Jul 29 17:19:50 2007 -- By: ludovic Bellier
gentoo quick guide
This is the commands I use when I update my gentoo.
update portage tree:
eix-sync
update packages:
emerge -uDavt world
emerge informations:
emerge --info
current profile:
eselect profile show
package depedencies:
equery depends <package>
package files list:
equery files <package>
package flags list:
equery uses <package>
remove orphaned depdencies (dangerous):
emerge --update --deep --newuse world emerge --depclean revdev-rebuild
MAJ: see first comment for precisions
681 hits / 1 comments
Sat Sep 2 17:37:21 2006 -- By: ludovic Bellier
Web browser signature
The signature of the Gecko like web browsers can be modified in the configuration page.
Go to about:config page and modify general.useragent parameters. See product, productComment, productSub, vendor, override.
So you can change the User-Agent informations sended to the web servers.
660 hits / 0 comments
Sat Jul 15 23:22:04 2006 -- By: ludovic Bellier
Do you RCS?
A quick reminder for rcs, with checkout/checkin commands.
Checkout and lock a file for editing:
co -l <file>
Checkin and unlock an edited file:
ci -u -w<login> <file>
744 hits / 0 comments
Wed Feb 8 22:17:42 2006 -- By: ludovic Bellier
rurld
description
rurld for Range URL Downloader is a program which downloads a range url.
example
an example:
$ rurld -n http://home.zyrianes.net/p/basset[1-2].jpg http://home.zyrianes.net/p/basset1.jpg http://home.zyrianes.net/p/basset2.jpg
without '-n' option, it downloads these files with the wget program:
$ rurld http://home.zyrianes.net/p/basset[1-2].jpg
--00:03:05-- http://home.zyrianes.net/p/basset1.jpg
=> `basset1.jpg'
Resolving home.zyrianes.net... 82.245.192.46
Connecting to home.zyrianes.net|82.245.192.46|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 52,292 (51K) [image/jpeg]
100%[====================================>] 52,292 --.--K/s
00:03:05 (6.82 MB/s) - `basset1.jpg' saved [52292/52292]
--00:03:05-- http://home.zyrianes.net/p/basset2.jpg
=> `basset2.jpg'
Reusing existing connection to home.zyrianes.net:80.
HTTP request sent, awaiting response... 200 OK
Length: 31,271 (31K) [image/jpeg]
100%[====================================>] 31,271 --.--K/s
00:03:05 (101.78 MB/s) - `basset2.jpg' saved [31271/31271]
FINISHED --00:03:05--
Downloaded: 83,563 bytes in 2 files
A range URL is an URL like link with range indication '['start'-'end']' , see example.
another example:
$ rurld -n http://foo.com/pic[01-11].jpg http://foo.com/pic01.jpg http://foo.com/pic02.jpg http://foo.com/pic03.jpg http://foo.com/pic04.jpg http://foo.com/pic05.jpg http://foo.com/pic06.jpg http://foo.com/pic07.jpg http://foo.com/pic08.jpg http://foo.com/pic09.jpg http://foo.com/pic10.jpg http://foo.com/pic11.jpg
help
use -h option:
$ rurld -h Range URL Downloader, version 0.9, gpl Usage: rurld [-n] [-h] <URL with range> -n dry_run mode, just show urls -h this help for example: rurld http://foo.com/pic[01-11].jpg downloads files from http://foo.com/pic01.jpg to http://foo.com/pic11.jpg note that [01-11] produces 01->11 and [1-11] 1->11 required: wget ( http://www.gnu.org/software/wget/wget.html )
This is a simple self made python program.
24109 hits / 147 comments
Sun Jan 8 23:40:53 2006 -- By: ludovic Bellier
Raccourcis Mutt
Je ne me rappelle jamais de certains raccourcis de Mutt, et je me tape la liste complète (touche ?) de l'aide, alors voici une liste de ceux que j'oublie tout le temps:
- ouvrir un dossier de mon arbre Imap : c
- supprimer un thread : ^D
843 hits / 0 comments
Mon Dec 12 01:41:37 2005 -- By: ludovic Bellier
Bash tips
Bash is a script shell for unix terminals.
Optimisations
- using ':' for 'true', because true is a software executable whereas ':' is an internal bash command. Very usefull for infinite loops.
example:
while true; do echo 'Hello'; sleep 1; done
become:
while :; do echo 'Hello'; sleep 1; done
- Thanks:
- Gwenn
1252 hits / 2 comments
Thu May 19 19:28:49 2005 -- By: ludovic Bellier
Screen tips
screen is a unix command that manages few virtual terminals.
Splitting the screen
Start screen with few terminals and use C-a S for splitting the current view. C-a TAB allows moving from one to another view.
So:
C-a S split the screen C-a TAB move to another view
man page: http://www.sunsite.ualberta.ca/Documentation/Gnu/screen-3.9.4/html_chapter/screen_toc.html
Thanks to Gwenn aka demisel.
732 hits / 0 comments
Thu May 19 14:03:08 2005 -- By: ludovic Bellier