Posts

Grub2 in ubuntu karmic

This is a good thread on info about the new grub in karmic http://ubuntuforums.org/showthread.php?t=1195275

remove all *~ files with one command

This one handles files with white spaces: find . -name "*~" -type f -print0|xargs -0 rm

Just learned about rsync

I just learned about the rsync command which is amazingly useful. I have been using scp to copy folders from one machine at home to a machine in the lab back and forth and so far it's been good, and dead simple, but always involved extra work like making moving directories around. Now that I learned rsync, I can simply back up my work from the lab to my machine and vice versa using a simple command. Here is the command I use: rsync --delete -ravuzn -delete-excluded --exclude=*~ --rsh=ssh ~/work/ david@server.at.work.com:~/work/ and then, (notice I remove the n flag) rsync --delete -ravuz -delete-excluded --exclude=*~ --rsh=ssh ~/work/ david@server.at.work.com:~/work/ so what does this command do: flags: --delete: if I have removed files from my local computer, they are also deleted on the server r: recursively go through the folders and subfolders a: archive v: verbose mode u: update z: compress files --delete-excluded: deletes excluded files passed as parameter (next flag) --exclu...

2 steps to ssh without passwords

Situation: You are on machine A, and you want to log in machine B without having to enter your password each time. On machine A: type: ssh-keygen -t rsa then press enter for default settings, and make sure you don't enter any paraphrase. Now, you need to send your public key to machine B. type: cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys' That's it !

Run python inside python and capture output

This is taken from http://techkr.blogspot.com/2007/02/python-how-to-get-output-from-ossystem.html: How to execute python inside python and capture output: A quick solution using popen : import os result=os.popen('command').read() print result where command is your command (expl. on windows: dir,ipconfig,...) If you expect more than a line and want each word in a list: import os,string result=string.split(os.popen('dir/w').read())

Labspotting

Image
I found this poster on a the Scientist Creative Quartely page at UBC, I thought it was funny ! That's a remix of the trainspotting poster.

Songbird - Ubuntu Jaunty

I had some error while trying to launch songbird on ubuntu jaunty 32 bit. I found on a website that this package needs to be removed sudo apt-get remove libvisual-0.4-plugins libvisual is the plugin that displays some images while playing music in some music players like totem... I removed it from the system and I can now launch Songbird. Here is the error I was getting when running songbird: ./songbird *** glibc detected *** ././songbird-bin: double free or corruption (out): 0xb199ed60 *** ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6[0xb7e55604] /lib/tls/i686/cmov/libc.so.6(cfree+0x96)[0xb7e575b6] /usr/lib/libvisual-0.4.so.0(visual_mem_free+0x21)[0xb1a7c141] /usr/lib/libvisual-0.4.so.0[0xb1a73407] /usr/lib/libvisual-0.4.so.0(visual_plugin_get_list+0x73)[0xb1a735e3] /usr/lib/libvisual-0.4.so.0(visual_init+0x291)[0xb1a82ec1] /usr/lib/gstreamer-0.10/libgstlibvisual.so[0xb267a273] /home/alchemist/apps/Songbird/lib/libgstreamer-0.10.so[0xb3556b2a] /home/alchemist/apps/Songbird...