View the newest xkcd comic.

2009-12-07 1 min read Bash Linux

This function displays the latest comic from xkcd.com. One of the best things about xkcd is the title text when you hover over the comic, so this function also displays that after you close the comic.

$ xkcd(){ local f=$(curl -s <a href="http://xkcd.com/">http://xkcd.com/);display $(echo "$f"|grep -Po '(?<=")http://imgs.xkcd.com/comics/[^"]+(png|jpg)');echo "$f"|awk '/<img src="http://imgs.xkcd.com/comics/.?" title=./{gsub(/^.title=.|".?$/,"");print}';}

To get a random xkcd comic, I also use the following:

xkcdrandom(){ local f=$(wget -q <a href="http://dynamic.xkcd.com/comic/random/">http://dynamic.xkcd.com/comic/random/ -O -);display $(echo "$f"|grep -Po '(?<=")http://imgs.xkcd.com/comics/[^"]+(png|jpg)');echo "$f"|awk '/<img src="http://imgs.xkcd.com/comics/.?" title=./{gsub(/^.title=.|".?$/,"");print}';}

Continue reading

Insert a comment on command line for reminder

2009-12-05 1 min read Bash Linux

<a href="http://blog.amit-agarwal.co.in/category/linux/">Bookmark this category
Insert a comment on command line for reminder

$ ls -alh #mycomment

Comments can be used directly on the command line so I can save in the history a brief description of what command does.

* View this command to comment, vote or add to favourites * View all commands by vgagliardi

commandlinefu.com

by David Winterbottom (codeinthehole.com)

URL: <a href="http://feedproxy.google.com/~r/Command-line-fu/~3/_5hXsFUuAwc/insert-a-comment-on-command-line-for-reminder">http://feedproxy.google.com/~r/Command-line-fu/~3/_5hXsFUuAwc/insert-a-comment-on-command-line-for-reminder

gnome-shell and gnome-do on F11 Screenshots

2009-12-02 1 min read Fedora GNOME

Here are some screenshots of gnome-shell :

<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/screenshot_0011.jpe"><img class="size-full wp-image-1246" title="Gnome Shell" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/screenshot_0011.jpe" alt="Gnome Shell" width="840" height="525" />

<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Screenshot.png"><img class="size-full wp-image-1247" title="Gnome Shell" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Screenshot.png" alt="Gnome Shell" width="840" height="525" />

<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Screenshot-1.png"><img class="size-full wp-image-1248" title="Gnome Shell" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Screenshot-1.png" alt="Gnome Shell" width="840" height="525" />

<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Screenshot-2.png"><img class="size-full wp-image-1249" title="Gnome Shell" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/Screenshot-2.png" alt="Gnome Shell" width="840" height="525" />

Happy Diwali wishes

2009-12-01 1 min read Linux

All the BEST and my best wishes for Diwali to all my readers.

<img title="Diwali Wishes" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2009/12/diwali-fireworks-cc-sumith-meher.jpg" alt="Diwali Wishes" width="800" height="799" />

<img title="Diwali Celebrations" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2009/12/windowslivewriteramazingbangaloreasolaceinpictures-a3b8diwali21.png" alt="Diwali Celebrations" width="640" height="382" />

Sorry about the delay in the wishes.. was held up with one of my 250GB HDD crashing..

Alexa ranking improved by 1000%

2009-11-26 1 min read Uncategorized

I just checked my <a id="aptureLink_XU7RJWNcFG" href="http://en.wikipedia.org/wiki/Alexa%20rank">Alexa ranking and guess what, I have a 1000% change in last 7 days. Thanks to all my readers.

<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/amit-agarwal.alexa_.jpg"><img class="size-full wp-image-1423" title="amit-agarwal.alexa" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/amit-agarwal.alexa_.jpg" alt="amit-agarwal.alexa" width="671" height="340" />

Using snmp trap receiver on Fedora (Linux)

2009-11-25 1 min read Fedora

First off install the net-snmp things:

sudo yum install net-snmp net-snmp-utils

After that it will run out of the box with the command:

sudo snmptrapd -A -d -n -Lf trap.log

Some interesting links:

<a class="fixed" href="http://net-snmp.sourceforge.net/wiki/index.php/TUT:snmptrap" target="_blank">http://net-snmp.sourceforge.net/wiki/index.php/TUT:snmptrap
<a class="fixed" href="http://net-snmp.sourceforge.net/wiki/index.php/TUT:Configuring_snmptrapd#Matching_SNMPv2_OIDs" target="_blank">http://net-snmp.sourceforge.net/wiki/index.php/TUT:Configuring_snmptrapd#Matching_SNMPv2_OIDs
<a class="fixed" href="http://www.net-snmp.org/tutorial/tutorial-5/commands/snmptrap.html" target="_blank">http://www.net-snmp.org/tutorial/tutorial-5/commands/snmptrap.html

Older posts Newer posts