bash – using the vi mode more effectively.

2013-11-22 1 min read bash
Vi blogging bundle (Photo credit: pedro mg) You can first set the bash mode to vi. This will enable some vim like features to bash. So, add this to .bashrc : set -o vi Once, you have done that then its time to get more out of the vi mode. First, check some things and set some interesting stuff. #Display all the bindings : bind -P #Copy the current bindings and use it in inputrc: bind -p |grep -v self-insert>~/. Continue reading

using `!#$’ to referance backward-word

2011-11-03 1 min read bash Linux
Image by jeffalldridge via Flickr Here is something that I found on the commandlinefu cp /work/host/phone/ui/main.cpp !#$:s/host/target Ah well…its very interesting and very useful. Some explanation: !# – means the current command (similar to !! being the last command) $ – represents the last parameter :s – is used for substitution. Related articles CommandLineFu: Amazing Collection Of Command Line Gems [Linux & Mac] (makeuseof.com) Oh, the Iron-y (ftalphaville.ft.com)

Some pictures from Burj Khalifa

2011-08-01 1 min read Photo
{.shutterset_} [php] $file = ‘/var/chroot/home/content/02/6377202/html/wp/wp-content/uploads/copper_albums/Parks_Dubai/orig_DSC_5287.jpg’; $exif = exif_read_data(“$file”, 0, true); $key=”EXIF“; $exif = exif_read_data(“$file”, “$key”); echo “[table border=”1”]”; //foreach ($exif as $key => $section) { //similar_text($section, ‘EXIF’, $p); //if ( $p == 0 ) //{ foreach ($exif as $name => $val) { echo “[tr]”; echo “$key.$name ”; echo “$val ”; echo “[/tr]”; } //} //} echo “[/table]”; [/php] Related articles Burj Khalifa tower (hazimiai.wordpress.com) A Better Finder Attributes 5.05 features new EXIF Engine (themactrack. Continue reading

Deleting all mails in the N900 (Maemo 5) permanently

2011-06-14 2 min read Maemo N900
Well couple of days back, I checked the folder details of one of my accounts configured on the N900 (Maemo 5) and it was showing some 1000 or more emails, whereas I had only 4-5 emails in the Inbox so where are the other emails and how to I get rid of them. This was causing the mail application to become a little slower than usual so do I live with it, I decided not to do so and thus found out how to delete all the mails. Continue reading