Latest posts

Guitar Chords - Ilaahi mi bin (Unoosha's version)

On: Tuesday, November 24, 2009

Hey peeps.

This is one of my all time (and your) favourite classic of classics transcribed for the acoustic guitar. I'm sure no self respecting Maldivian needs a second introduction to this song (if you do, ask your mom). Note that this is based on Unoosha's rendition of the song and not the original. If you see this Kiddy, you did a great job.

You can find her version on her facebook fan-page HERE.
the original should be somewhere on youtube.

Ideally played on two guitars.

oh and before you go and steal my work and claim all the credit...fuck you... you guys suck. You know who you are. The rest of you, enjoy these guitar chords of ilaahi mi bin (ilahi mi bin,ilaahee mi bin etc...) (sorry..google search ;))

Check out the rest of my chords and stuff.


A slow arpeggio picking works nicely with this. It's meant to be
a slow song, so don't rush it.

ILAAHEE MI BIN


[INTRO]

A D A D
e |------------12-----|-12-14 16-17-14-12-|
b |----12-14 15-------|-------------------|
g |-14----------------|-------------------|
d |-------------------|-------------------|
a |-------------------|-------------------|
E |-------------------|-------------------|

A D Bm E
e |-12-14-16-17-14-12-|-------------------|
b |-------------------|---14-14-15-12-12--|
g |-------------------|-------------------|
d |-------------------|-------------------|
a |-------------------|-------------------|
E |-------------------|-------------------|


[CHORUS]
A D A
ilaahee mi bin, kuravaandhey amaan
D A Bm E
mi-alhaage ufan dhiveheen ge mi bin
A Bm
thibaa hazrathun, ohey madhadhun
A E A
filaa numedhaa, dhiveheenge mi bin


[INTERLUDE]

A Bm C#m E A
e |-0--------|-2--------|-4--------|-7------5--|
b |----2-----|---3------|----5-----|----9---5--|
g |-------2--|------4---|-------6--|--------6--|
d |-2--------|-4--------|-6--------|-9------9--|
a |----------|----------|----------|--------9--|
E |----------|----------|----------|--------5--|


CHORUS

D A
mithaange vayaa, mithaange fenaa
D A
mithaange kandaa, ekanduge oyaa
D A
gathaa uthares, mi rukuge fanaa
D E A
mithaa mi alhaa ge gulhifaivaa

A Bm E
gudhurathuge ilaahee niumathuga
E D A
abdhuge abadhah dhiremun dhiremun


CHORUS

INTERLUDE


D A
migaumuge kaa'bafainge leyaa
D A
ekashithah ekuve dhiya veyya
D A
miyavvure vaki azeezu thanei
D E A
nuvaa mi alhaa ufan vi hiyaa

A Bm E
thiya mathiveri rahumathugaa lavva
E D A
barakaathuge vaarey vissavamun


CHORUS


OUTRO:
e |-----------5-7-9-10-12-14-16-17--|
b |---------5-----------------------|
g |-------6-------------------------|
d |-----7---------------------------|
a |---7-----------------------------|
E |-5-------------------------------|

Replying to Facebook mail on command line

On: Wednesday, November 18, 2009

this is a little helper script that I wrote to use in conjunction with FBCMD to reply to inbox messages directly on the command line without going to the website.

It takes two args, the message number (as given out by fbcmd inbox) and the message itself. pretty straightforward. Just throwing it out there.

it's meant to be used with fbcmd, but if you like you can provide a thread_id to it as well (slight mod might be needed)



#!/usr/bin/perl

use strict;
use WWW::Mechanize;
use HTTP::Cookies;

my $username = 'youremail';
my $password = 'yourpass';
my $maildata = "/home/youruser/.fbcmd/maildata.txt";

my $msgid=`php -r \"\\\$ld=unserialize(file_get_contents('$maildata'));print \\\$ld['ids'][$ARGV[0]];\"`;

my $mech = WWW::Mechanize->new();
$mech->cookie_jar(HTTP::Cookies->new());

$mech->get("http://lite.facebook.com/login/");
$mech->submit_form(form_number => 1,fields =>{email=>$username,password=>$password});

$mech->content() =~ /\/w\/(\w+)\/logout/;
$mech->post("http://lite.facebook.com/w/".$1."/inbox/reply/".$msgid."/",{message=>$ARGV[1],__async__=>'true'});

Guitar Chords - Yaaraa Hinithun Veema

On: Sunday, October 4, 2009

Hey peeps... been a while. Just throwing something out there real quick. This is another timeless classic from...errr... I'm not sure who the original artist is for this one. If anybody knows throw me a bone in the comments.

I've decided to use the ChordPro format to upload chords from now on for convenience sake.you can find out more about the format HERE. You can use the CHORD program to prettify the layout if you like. OR visit http://webchord.sourceforge.net/ and paste it in the provided text field to get a prettified output on the fly.

check out my other uploads http://kudanai.blogspot.com/search/label/music
{title:Yaaraa Hinithun Veema}
{st:artist - unknown}
#chorded by KudaNai
#http://kudanai.blogspot.com
#thanks hassaan
#no copy rights claimed

{c:chorus}

{soc}
[G]yaaraa hinithun v[D]eema,hurev[C]eyne hey mih[G]en
[G]yaaraa beynun v[D]eema,dhuruv[C]aane hey ma [G]dhen
[Am]veemaa naah[D]aashey keevve [G]hey,adhi
[Am]noonee nubun[D]aashey noonek[G]ey
{eoc}

{c:chorus}

[Am]maamaluge meeru [G]vas thakun, [C]maazee handhaan va[G]nee
[Am]loabee ge inthi[G]zaaruga,[C]mi hihiyaalu aavanee
[Am]naahaashey [G]keevvehey,nubu[Am]naashey [G]noonekey
[Am]hiy-ves dhineem[D]ey

{c:chorus x 2}

[Am]kairin kalaa bal[G]aalumun,[C]neyngeyhe veego[G]thei
[Am]sirrei bunan handh[G]aanvefa,dh[C]oo bandhuvee mag[G]ey
[Am]naahaashey [G]keevvehey,nubu[Am]naashey [G]noonekey
[Am]hiy-ves dhineem[D]ey

{c:chorus}

Facebook inbox count for conky/others

On: Wednesday, July 15, 2009

YAFS again! I'll just throw this out there.

small perl (c-ish again I guess) script to get number of unread messages in facebook. for use with conky etc... supply username and pass as args.


#!/usr/bin/perl
use strict;
use WWW::Mechanize;
use HTTP::Cookies;

my $username = @ARGV[0];
my $password = @ARGV[1];

my $mech = WWW::Mechanize->new();
$mech->cookie_jar(HTTP::Cookies->new());
$mech->post("https://login.facebook.com/login.php?m&next=http://m.facebook.com/inbox",{email=>$username,pass=>$password});
$mech->content() =~ /Inbox\s\((\d+)\)/;

print $1?("$1 New Message".($1>1?"s\n":"\n")):"0 New Messages\n";

Uploading photos to Facebook groups with Perl

On: Sunday, July 12, 2009

here we go again, YAFS (yet another facebook script)

a little different this time since it's in Perl, which is new to me. This script takes a list of file names as arguments, and uploads them to a specified group on facebook. It uses WWW::Mechanize (which is awesome) to do the heavy lifting, and also depends on imagemagick (to resize images)

do note however that this was NOT written to be platform independent so windows users might encounter some problemns. However it should be fixable with a little modification.

USAGE

you'll need to edit the lines for your user-name and password.

perl gup.pl GID [file1] [file2] ...
where GID is the concerned groupID. You need to be a member of the group, and should have upload rights to its photo album.

#!/usr/bin/perl
# -----------------------------------------------
# Script to upload photos to a Facebook group.
# 2009 - kudanai, http://kudanai.blogspot.com
#
# This script can act as a nautilus extension.
# (preset GID and set $i=0 on line 59)
#
# This program is distributed in the hope that
# it will be useful,but WITHOUT ANY WARRANTY;
# without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE.
# -----------------------------------------------

use strict;
use WWW::Mechanize;
use HTTP::Cookies;

#edit your username, password and group_id here
#these values MUST BE CORRECT for the script
#to work properly
my $username = 'username@example.com';
my $password = 'password';
my $gid = $ARGV[0];

#-----no need to edit beyond this point-----

#url for login page + redirect instruction
my $url = "https://login.facebook.com/login.php?" .
"&next=http%3A%2F%2Fwww.facebook.com%2Feditalbum.php%3Foid%3D".
$gid."%26add%3D1%26htmlup%3D1";

#initialize objects
my $mech = WWW::Mechanize->new();
$mech->cookie_jar(HTTP::Cookies->new());

#notify
#system("notify-send -i fbnotif UPLOADING \"Logging in\"");

$mech->get($url);
$mech->submit_form(
form_number => 1,
fields =>{
email=>$username,
pass=>$password
},
button=>'login'
);

#notify - if you have libnotify installed, uncomment
#these notify commands to get progress notifications
#system("notify-send -i fbnotif UPLOADING \"Uploading photos\"");


#loop through args and post the files
#five at a time.

my $i=1;
while(defined $ARGV[$i])
{

$mech->form_name('upload');
for(my $j=1;$j<6;$j++,$i++)
{
if(defined $ARGV[$i])
{
system("convert -resize 604 \"".$ARGV[$i]."\" /tmp/".$j.".fgup.jpg");
$mech->field("file$j"=>"/tmp/$j.fgup.jpg");
}
}
$mech->tick('agree','1');
$mech->submit();
if(defined $ARGV[$i]) {
$mech->back()
}
}

#remove temporary images
system( "find /tmp -name '*.fgup.jpg' -exec rm {} \\;>/dev/null" );

#notify
#system("notify-send -i fbnotif UPLOADING \"Finished Uploads\"");

Removing dead/orphan entries from f-spot's database

On: Wednesday, July 8, 2009

This seems like a common problem for a lot of people -

dead or orphaned entries in f-spot :| technically, you shouldn't go behind f-spots back and delete the files directly, but sometimes ...well shit happens. like for me, I somehow managed to re-import the same pictures into my database twice..and was left with a crapload of duplicate images in my album..

the first problem is easily solvable, simply running

fdupes -dN

removes the duplicate entries in the given directory (use with caution)

but that still left us with f-spot's internal database still linking to dead entries

this makes me very sad...very very sad, as f-spot doesn't have a "refresh catalog" option.

so I came up with this not-so elegant but it works solution... so here we go

PROCEED WITH CAUTION....CAUTION I SAY!!! NOTE THE PROCEDURE BELOW WILL REMOVE REFERENCES TO MODIFIED VERSIONS AND SHITE AS WELL...


1.backup your database
cp ~/.gnome2/f-spot/photos.db ~/.gnome2/f-spot/photos.db.backup
CHECK CHECK AND DOUBLE CHECK if that worked..

2.extract the photo information
sqlite3 ~/.gnome2/f-spot/photos.db 'select id,uri from photos;' > entries
3.check for the dead entries

cat entries | while read i;do if [ ! -e "$(echo ${i} | cut -f2 -d'|' | sed 's/file:\/\///g')" ];then echo ${i};fi;done > deads

watch for line breaks...the above is a single line! Give it time to process...it may take a while depending on your db size (mine took 4 minutes)

4.delete the entries from the main table

cut -f1 -d"|" deads | while read i;do sqlite3 ~/.gnome2/f-spot/photos.db "delete from photos where id=${i};";done
.... AND from the version table

cut -f1 -d"|" deads | while read i;do sqlite3 ~/.gnome2/f-spot/photos.db "delete from photo_versions where photo_id=${i};";done
5. Now remve the working files you created

rm entries deads

and tadaaa!!!!!

a few things to note
1.it's not perfect
2.if you have edited versions, and the original is missing, references to edited versions will be removed.
3.you can fine tune the SQL in step 2 to restrict removals to specific folders or such;
eg:
SELECT id,uri FROM photos WHERE uri LIKE '%/2009/07/%';

Automatic birthday wishes on facebook

On: Monday, June 29, 2009

here we go yet again...another update. This time, aimed at trying to make the whole thing less complicated for people, and also remove the whole linux limitation thing as opposed to the older version that I put up three months ago. The response to this has been quite positive...

presenting... keyku 

This new version has been setup as a facebook application and not a hack, so it's more elegant this time, and errr.... a bit more...legal let's say (the old version violated the facebook terms of use a little...this one does not)

setup instructions can be found on the application page

feel free to drop in there and tinker around, suggest features, flame the discussion board etc :P

have fun.

once again, thanks to Dave Tompkins for his help.