Showing posts from 2009

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/ | ssh b@B 'cat >> .ssh/authorized_keys' That's it !

Run python inside python and capture output

This is taken from 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())


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/[0xb7e55604] /lib/tls/i686/cmov/[0xb7e575b6] /usr/lib/[0xb1a7c141] /usr/lib/[0xb1a73407] /usr/lib/[0xb1a735e3] /usr/lib/[0xb1a82ec1] /usr/lib/gstreamer-0.10/[0xb267a273] /home/alchemist/apps/Songbird/lib/[0xb3556b2a] /home/alchemist/apps/Songbird

Talking to BlueSMiRF RP-SMA Bluetooth with Putty

These are notes on how to talk to the BlueSmirf bluetooth chip. I am trying to talk to a bluetooth chip from my ubuntu box. I have Putty installed, and a Serial to USB cable connected to a FT232R Breakout board. This board is then connected to the bluetooth chip by crossing Tx and Rx pins. The following hardware is used: FT232R Breakout Board BlueSmirf bluetooth I am writing this post because I struggled for about an hour on how to talk to the chip with putty. The solution ended up to be simple. Load putty with baud rate 115200, 8N1. Remember to use 115200, otherwise it will not work. Have I had followed the documentation closely, I would have been able to talk to the bluetooth chip in 5 minutes.

Open Source Solution for multiple mobile platforms

This article is really interesting. Basically, why would we want to invest the time into learning how to code on a specific mobile platform if we could learn how to do it on a generic platform? Read the article: Open Source Solution for multiple mobile platforms

How to detect your android device on Ubuntu 9.04 Jaunty x32

To detect your Android Dev phone on ubuntu 9.04 (Jaunty, x32), do the following: 1. cd /etc/udev/rules.d/ 2.a. if you have a file named 50-android.rules, then do: mv 50-android.rules 51-android.rules 2.b. if you don't have the file, do the following: vi 51-android.rules (note: it will create a new file) In this file, add the following: UBSYSTEM=="usb", ATTRS{idVendor}=="0bb4", MODE="0666" 3. Unplug and plug again your device, then type: adb devices and you should see something like: List of devices attached HT...... device For more info, check out this post on Android Google Groups: Ubuntu Jaunty and adb not playing well together

The beginning of Android by Wired

Check out this article about Android. Android in Wired

Sprint on Twitter

A cool Sprint adv.


I have been learning vi for the last few months, and in an effort to use it more, I have installed Vimperator on Firefox. It is basically an add-ons that can be installed on Firefox and what it does it that lets you browse a page using vi commands. It is pretty nice, it allows me to browse a page without using the mouse. It gets very addictive actually because you come to a certain point where you even *feel lazy* to grab the mouse to browse the page.... Well, feeling lazy is a bit of an exaggeration... It's more than sometimes I am in the mood to use the mouse, sometimes I would rather keep my fingers on the keyboard. Anyhow, it doesn't work well all the time though... But here is a command I found very useful for copying and pasting 1. / to search for something 2. i to enter carret mode 3. v to enter visual mode 4. move by j,k to select the text 5. y to yank the text 6. ctrl-v to paste later on... that's it !

Android without sim card

Here's how I managed to use android without a sim card: Credits goes to this person: Connect the device to your computer using the USB cable. You should be able to see a listing for your device if you run adb devices . Then execute the following commands. $ adb shell $ su $ cd /data/data/ $ sqlite3 settings.db INSERT INTO system (name, value) VALUES ('device_provisioned', 1); .exit $ reboot After reboot: $ adb shell am start -a android.intent.action.MAIN -n

transparent shell xfce

alltray --borderless --skip-taskbar xfce4-terminal --hide-menubar --hide-borders --geometry 600x600-10+10

This part of my life is called Xfce

I have been using gnome for some times now, and I feel like I want to experience other X Window. I have used Fluxbox in the past, but it was affecting my productivity, so I never really made the switch. This time, I will try Xfce for a little while. We used to have this window manager at McGill, and it is very light, and fast. The cool thing about xfce is that I can setup a transparent shell on the background. Here is a picture:

Cut/Copy and paste in vi

To cut and paste in vi: Get to command mode (press esc) and type mx at the start of the place you would like to cut and go to the position where you want to stop cutting and type d'x. Explanation: m starts a buffer with name x and d'x will cut it . To copy and paste in vi: Type mx and y'x Explanation: same as above except that y'x is meant for yanking (copying) buffer with name x.

My first Apple product !

I finally bought my first Apple product. To be honest, I am not a real fan of Apple but that being said, their IPhone kicks ass!! I don't really want to get into a discussion on whether we should go for Apple products because this would sound similar to asking whether Windows is better than Linux or whether KDE is better than Gnome... The IPhone I recently bought is my second smartphone. The first one was a Nokia N95 8GB, which was very comparable to the IPhone in terms of features. I have been using the N95 for 4-5 months, and the IPhone for only 3 or 4 days, and let me tell you that the IPhone is my best choice! To be more fair, let say Nokia has features that the IPhone doesn't have (like 5MegaPixel camera, very good video recording), and the IPhone has .... the rest ! I encoutered some problems with the IPhone, though. I wanted to do some simple tasks but the IStore doesn't have the application (for free of course!) that can help me with that. For instance, think about