Posts

An alternative to build UI in Android

Dumping WYSIWYG: Building Android User Interfaces at Run Time

retrieve voice videos from IPhone using scp

if you ever need to retrieve your voice memos from you IPhone, you can do it by scp: Voice memos are found at: /User/Media/Recordings/

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())