<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/blog/templates/default/atom.css" type="text/css" ?>

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://mel.icious.net/blog/feeds/atom10.xml" rel="self" title="spoonfork" type="application/atom+xml" />
    <link href="http://mel.icious.net/blog/"                        rel="alternate"    title="spoonfork" type="text/html" />
    <link href="http://mel.icious.net/blog/rss.php?version=2.0"     rel="alternate"    title="spoonfork" type="application/rss+xml" />
    <title type="html">spoonfork</title>
    <subtitle type="html">that iban dude</subtitle>
    <icon>http://mel.icious.net/blog/templates/default/img/s9y_banner_small.png</icon>
    <id>http://mel.icious.net/blog/</id>
    <updated>2008-03-19T10:07:21Z</updated>
    <generator uri="http://www.s9y.org/" version="1.2.1">Serendipity 1.2.1 - http://www.s9y.org/</generator>
    <dc:language>en</dc:language>

    <entry>
        <link href="http://mel.icious.net/blog/archives/Maxis-Hellooooooo.html" rel="alternate" title="Maxis??? Hellooooooo?" />
        <author>
            <name>spoonfork</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2008-03-19T10:07:21Z</published>
        <updated>2008-03-19T10:07:21Z</updated>
        <wfw:comment>http://mel.icious.net/blog/wfwcomment.php?cid=1225</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://mel.icious.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1225</wfw:commentRss>
    
    
        <id>http://mel.icious.net/blog/archives/1225.html</id>
        <title type="html">Maxis??? Hellooooooo?</title>
        <content type="xhtml" xml:base="http://mel.icious.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                So friends been SMS-ing me today - but I didn't received any. I thought it was phone problem. Rebooted the hand phone, still no new SMSes. I already paid all my bills. So WTF Maxis? 
            </div>
        </content>
        <dc:subject>maxis</dc:subject>

    </entry>
    <entry>
        <link href="http://mel.icious.net/blog/archives/Sunburst-International-Music-Festival-2008,-Bukit-Kiara,-Kuala-Lumpur.html" rel="alternate" title="Sunburst International Music Festival 2008, Bukit Kiara, Kuala Lumpur" />
        <author>
            <name>spoonfork</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2008-03-19T04:27:14Z</published>
        <updated>2008-03-26T01:21:18Z</updated>
        <wfw:comment>http://mel.icious.net/blog/wfwcomment.php?cid=1224</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://mel.icious.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1224</wfw:commentRss>
    
    
        <id>http://mel.icious.net/blog/archives/1224.html</id>
        <title type="html">Sunburst International Music Festival 2008, Bukit Kiara, Kuala Lumpur</title>
        <content type="xhtml" xml:base="http://mel.icious.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Last week I went to Sunburst Internation Music Festival in Bukit Kiara, Kuala Lumpur. Here's what happened:<br />
<br />
<ul><br />
<li>1:45 pm - Found parking in front of the entrance to Bukit Kiara Equestrian Club</li><br />
<li>2:45 pm - Gates opened. Kanineh. They said gate will open at 2. Abuden, each place in KL has its own timezone. Kanineh.</li><br />
<li>3:15 pm - First show - <a href="http://flickr.com/photos/spoonfork/tags/gerhanaskacinta">Gerhana Ska Cinta</a>. Sucks big time. And they only play for like, 45 minutes. WTF???</li><br />
<li>3:20 pm - Second show - <a href="http://flickr.com/photos/spoonfork/tags/gigi">Gigi</a>. Memang best giler diarong punya show. Gempak siot. In my opinion, they're the best performer that day. Rock sial.</li><br />
<li>4 something - Third show - Pop Shuvit. Watched a few performances, then decided to go minum beer cause I was thirsty. Plus it started to rain</li><br />
<li>5 something - Hujan lebat sial. I decided to take photos of the <a href="http://flickr.com/photos/spoonfork/2340147654/">tuborg girls</a>. Semua tak choon, body pun flat, but....</li><br />
<li>Almost 6 - Eated burger. Eated some other food. Had two more beers.</li><br />
<li>6 something - Watched George Clinton. Memang rock sial. I mean, if there's someone that you should watch live, watch George Clinton. He's like, 70 years old and still can funk! Go watch him if you can before he like, yanno, kong.</li><br />
<li>8 something - Watched Joe Flizzow. Tak rock sangat</li><br />
<li>9 something - The Roots!!!! Best giler sial. Memang best. The Roots was the only motivation for me to spend RM200 for Sunburst. The Roots!!!!</li><br />
<li>9:30 something - received an SMS saying that UMNO will try to invoke non-Malays to incite riots. WTF.</li><br />
<li>10 something - drove home</li><br />
<li>11 something - had maggie goreng at Devi's corner in TTDI. Man U vs Derby game was on</li><br />
<li>12 something - reached home. At first, wanna go see Uncle St Patrick and drink Stout, but I was damn tired.</li><br />
<li>12 something - check if <a href="http://security.org.my">security.org.my</a> got kena hack. phew nothing happened.</li><br />
<li>12 something - went to sleep</li><br />
</ul><br />
Photos <a href="http://flickr.com/photos/spoonfork/">here</a>. 
            </div>
        </content>
        <dc:subject>concert</dc:subject>
<dc:subject>live shows</dc:subject>
<dc:subject>music festival</dc:subject>
<dc:subject>sunburst</dc:subject>

    </entry>
    <entry>
        <link href="http://mel.icious.net/blog/archives/I,-Lazy.html" rel="alternate" title="I, Lazy" />
        <author>
            <name>spoonfork</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2008-03-19T04:25:06Z</published>
        <updated>2008-03-19T04:25:06Z</updated>
        <wfw:comment>http://mel.icious.net/blog/wfwcomment.php?cid=1223</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://mel.icious.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1223</wfw:commentRss>
    
    
        <id>http://mel.icious.net/blog/archives/1223.html</id>
        <title type="html">I, Lazy</title>
        <content type="xhtml" xml:base="http://mel.icious.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I've been very lazy in updating this blog. This is because I spend most of my time at <a href="http://security.org.my/">security.org.my</a>, blogging about the Malaysia security scene. <br />
<br />
Listening to: Portishead - Mysterons 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://mel.icious.net/blog/archives/Migrating-from-Wordpress-to-Serendipity.html" rel="alternate" title="Migrating from Wordpress to Serendipity" />
        <author>
            <name>spoonfork</name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2008-02-29T05:03:32Z</published>
        <updated>2008-03-06T16:28:26Z</updated>
        <wfw:comment>http://mel.icious.net/blog/wfwcomment.php?cid=1222</wfw:comment>
    
        <slash:comments>2</slash:comments>
        <wfw:commentRss>http://mel.icious.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1222</wfw:commentRss>
    
    
        <id>http://mel.icious.net/blog/archives/1222.html</id>
        <title type="html">Migrating from Wordpress to Serendipity</title>
        <content type="xhtml" xml:base="http://mel.icious.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                For years, this blog has been powered by <a href="http://wordpress.org">Wordpress</a>. Prior to this, it was running on a custom weblog engine written by myself. That particular engine lacks quite a number of features, especially spam protection. Everyone else was using wordpress, so i joined the bandwagon. Until now. For years, wordpress have been plagued with security vulnerabilities, and updating it has become such a chore. Besides, I live in the constant fear that this blog will defaced/hacked almost everyday due to the fact that it was running wordpress. So now, I've changed to <a href="http://www.s9y.org">Serendipity</a>. One of the main reason for choosing Serendipity is that <a href="http://security.org.my">security.org.my</a> has been running on it since July 2007. Since that time, there have been 3 critical vulnerabilities in Wordpress, and Serendipity has one XSS vulnerability in one of its plugin. That is more than enough motivation for me to migrate. Secondly, I like Serendipity's plugins. Installing, deinstalling and updating  is damn easy via admin page. <br />
<br />
Now for those of you who wants to migrate from Wordpress to Serendipity, Serendipity provides an export function in the admin page. It is very straighforward, everything is imported without any hitch. 
            </div>
        </content>
        <dc:subject>geek stuff</dc:subject>
<dc:subject>serendipity</dc:subject>
<dc:subject>wordpress</dc:subject>

    </entry>
    <entry>
        <link href="http://mel.icious.net/blog/archives/bashing-the-shell.html" rel="alternate" title="bashing the shell" />
        <author>
            <name></name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2008-02-18T18:26:02Z</published>
        <updated>2008-02-29T04:40:00Z</updated>
        <wfw:comment>http://mel.icious.net/blog/wfwcomment.php?cid=1221</wfw:comment>
    
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://mel.icious.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1221</wfw:commentRss>
    
    
        <id>http://mel.icious.net/blog/archives/1221.html</id>
        <title type="html">bashing the shell</title>
        <content type="xhtml" xml:base="http://mel.icious.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                I've been writing quite a large amount of shell scripts for the past few days. Here's are some tips that might be of help.<br />
<br />
<b>1. debugging</b><br />
<br />
The simplest way to step through the execution of your shell script is to provide it with the -x option. For example: sh -x myscript.sh<br />
<br />
<b>2. array</b><br />
<br />
Yes, shell script can do them. To create an array:<br />
<br />
foo=("apple" "orange" "lemon" "durian")<br />
<br />
Another example of creating an array automatically:<br />
<br />
NETDEVICES="$(cat /proc/net/dev | awk -F: '/[0-9]:/{print $1}')"<br />
<br />
To iterate through the array, a for loop will do:<br />
<pre>
for DEV in $NETDEVICES; do
    echo -n "$DEV"
done
</pre><br />
<br />
<b>3. printing a specific line from a file</b><br />
This is a simple <code>head</code> and <code>tail</code> trick:<br />
<br />
1st line: cat file.txt | head -n1<br />
2nd line: cat file.txt | head -n2 | tail -n1<br />
3rd line: cat file.txt | head -n3 | tail -n1<br />
<br />
and so on...<br />
<b>4. maths</b><br />
<pre>
a=1
b=2
c=$(( $a + $b))
</pre><br />
shell script however, does not support decimals. For this, I use awk with printf:<br />
<pre>
a=1.1
b=2.2
c=$(echo $a $b | awk '{printf("%s", ($1+$2))}')
</pre><br />
<br />
<b>5. string concatenation</b><br />
<pre>
a="takizo"
b="memang"
c="handsome"
d=$a" "$b" "$c
</pre><br />
or<br />
<pre>
a="takizo"
b="memang"
c="handsome"
d=${a}" "${b}" "${c}
</pre><br />
<br />
<b>6. manipulating IFS</b><br />
IFS stands for internal field separator (or something like that). Example:<br />
<pre>
a="paul|memang|handsome"
IFS="|"
echo $a
</pre><br />
This will replace the IFS with spaces. Of course, for the above, you can use awk:<br />
<pre>
a="paul|memang|handsome"
echo $a | awk -F | '{ printf("%s %s %s", $1, $2, $3) }'
</pre><br />
<br />
<b>7. return codes</b><br />
use $?. Example:<br />
<pre>
cat /etc/passwd
echo $?
cat /etc/password
echo $?
</pre><br />
<br />
<b>8. other shell special vars</b><br />
These are also good for debugging. Try them out for yourself too see what they actually output. Example:<br />
<pre>
#!/bin/sh
echo "ARG: $1 $2 $3 $4"
echo "script name: $0"
echo "num args: $#"
echo "pid: $$"
echo "options: $-"
echo "args: $*"
echo "args: $@"
echo $?
</pre><br />
 
            </div>
        </content>
        <dc:subject>geek stuff</dc:subject>
<dc:subject>shell script</dc:subject>

    </entry>
    <entry>
        <link href="http://mel.icious.net/blog/archives/Gimp.app-Fixing-Random-Crashes-on-OS-X-Leopard.html" rel="alternate" title="Gimp.app: Fixing Random Crashes on OS X Leopard" />
        <author>
            <name></name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2008-01-13T03:57:02Z</published>
        <updated>2008-01-13T03:57:02Z</updated>
        <wfw:comment>http://mel.icious.net/blog/wfwcomment.php?cid=1220</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://mel.icious.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1220</wfw:commentRss>
    
    
        <id>http://mel.icious.net/blog/archives/1220.html</id>
        <title type="html">Gimp.app: Fixing Random Crashes on OS X Leopard</title>
        <content type="xhtml" xml:base="http://mel.icious.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                In this <a href="http://security.org.my/index.php?/archives/Wireshark-on-OS-X-Leopard-Fix-Random-Crashes.html">post</a> at the <a href="http://security.org.my/">security.org.my</a> blog, I outlined a fix for fixing random crashed of Wireshark on OS X Leopard. <br />
<br />
Apparently, after replacing the Leopard-shipped Xquartz, <a href="http://gimp-app.sourceforge.net/">Gimp.app 2.4-rc3</a> no longer crashes as well! Sweet!<br />
<br />
 
            </div>
        </content>
        <dc:subject>geek stuff</dc:subject>

    </entry>
    <entry>
        <link href="http://mel.icious.net/blog/archives/To-the-driver-of-WMD-6468,-you-are-a-true-Malaysian-asshole.html" rel="alternate" title="To the driver of WMD 6468, you are a true Malaysian asshole" />
        <author>
            <name></name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2008-01-05T08:29:12Z</published>
        <updated>2008-01-05T08:29:12Z</updated>
        <wfw:comment>http://mel.icious.net/blog/wfwcomment.php?cid=1219</wfw:comment>
    
        <slash:comments>7</slash:comments>
        <wfw:commentRss>http://mel.icious.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1219</wfw:commentRss>
    
    
        <id>http://mel.icious.net/blog/archives/1219.html</id>
        <title type="html">To the driver of WMD 6468, you are a true Malaysian asshole</title>
        <content type="xhtml" xml:base="http://mel.icious.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                See how this car is blocking the exit. Repeated honkings later, I gave up. I had to reverse all the way back to use another exit. <br />
<center><br />
<a href="http://mel.icious.net/gallery/misc/Image027"><img src="http://mel.icious.net/albums/misc/Image027.sized.jpg" width="400" /></a><br />
<br />
<a href="http://mel.icious.net/gallery/misc/Image026?full=1"><img src="http://mel.icious.net/albums/misc/Image026.sized.jpg" width="400" /></a><br />
<br />
<a href="http://mel.icious.net/gallery/misc/Image025?full=1"><img src="http://mel.icious.net/albums/misc/Image025.sized.jpg" width="400" /></a><br />
</center><br />
Related: <a href="http://flickr.com/photos/spoonfork/216675784/">BGB 1009 is an asshole</a> 
            </div>
        </content>
        <dc:subject>utensils</dc:subject>

    </entry>
    <entry>
        <link href="http://mel.icious.net/blog/archives/Viagra-70%25-X-Mas-special,-courtesy-of-your-friendly-Anti-Corruption-Agency-Website.html" rel="alternate" title="Viagra 70% X-Mas special, courtesy of your friendly Anti Corruption Agency Website" />
        <author>
            <name></name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2007-12-17T04:02:46Z</published>
        <updated>2007-12-17T04:02:46Z</updated>
        <wfw:comment>http://mel.icious.net/blog/wfwcomment.php?cid=1218</wfw:comment>
    
        <slash:comments>4</slash:comments>
        <wfw:commentRss>http://mel.icious.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1218</wfw:commentRss>
    
    
        <id>http://mel.icious.net/blog/archives/1218.html</id>
        <title type="html">Viagra 70% X-Mas special, courtesy of your friendly Anti Corruption Agency Website</title>
        <content type="xhtml" xml:base="http://mel.icious.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                You can read all about it <a href="http://security.org.my/index.php?/archives/Viagra-70%25-Off-X-Mas-Special,-Courtesy-of-www.bpr.gov.my-and-moe.gov.my.html">here</a>. <br />
<br />
These other posts, should make a fun reading as well. <br />
<br />
<a href="http://security.org.my/index.php?/archives/.gov.my-Porn-Para-Sites.html">*.gov.my Porn Para-Sites</a><br />
<br />
<a href="http://security.org.my/index.php?/archives/Using-Google-to-Find-HackedDefaced-Malaysian-Government-Websites.html">Using Google to Find Hacked/Defaced Malaysian Government Websites</a>.<br />
<br />
Enjoy! 
            </div>
        </content>
        <dc:subject>utensils</dc:subject>

    </entry>
    <entry>
        <link href="http://mel.icious.net/blog/archives/robofest-malaysia.html" rel="alternate" title="robofest malaysia" />
        <author>
            <name></name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2007-11-28T17:11:28Z</published>
        <updated>2007-11-28T17:11:28Z</updated>
        <wfw:comment>http://mel.icious.net/blog/wfwcomment.php?cid=1217</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://mel.icious.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1217</wfw:commentRss>
    
    
        <id>http://mel.icious.net/blog/archives/1217.html</id>
        <title type="html">robofest malaysia</title>
        <content type="xhtml" xml:base="http://mel.icious.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                it's on at PWTC from 27th - 30th November. information <a href="http://www.robofest.org.my/robofest07.html">here</a>. uh, they have a <a href="http://www.robofest.org.my/conqueror.html">capture the flag</a> game as well. 
            </div>
        </content>
        <dc:subject>utensils</dc:subject>

    </entry>
    <entry>
        <link href="http://mel.icious.net/blog/archives/deepsec-writeup,-roboexotica.html" rel="alternate" title="deepsec writeup, roboexotica" />
        <author>
            <name></name>
            <email>nospam@example.com</email>
        </author>
    
        <published>2007-11-28T12:58:50Z</published>
        <updated>2007-11-28T12:58:50Z</updated>
        <wfw:comment>http://mel.icious.net/blog/wfwcomment.php?cid=1216</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://mel.icious.net/blog/rss.php?version=atom1.0&amp;type=comments&amp;cid=1216</wfw:commentRss>
    
    
        <id>http://mel.icious.net/blog/archives/1216.html</id>
        <title type="html">deepsec writeup, roboexotica</title>
        <content type="xhtml" xml:base="http://mel.icious.net/blog/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                a short writeup <a href="http://security.org.my/index.php?/archives/DeepSec-Vienna-Trip-Report.html">here</a>, deepsec photos <a href="http://mel.icious.net/gallery/deepsec">here</a> and roboexotica photos <a href="http://mel.icious.net/gallery/roboexotica">here</a>. 
            </div>
        </content>
        <dc:subject>utensils</dc:subject>

    </entry>

</feed>