≡ Menu


Book: iPhone Hacks

The iPhone is an internet-connected multimedia smartphone. Chances are if you own an iPhone (or iPod) , you long to discover its hackability. And a new book from O'Reilly iPhone Hacks can help you do just that. This book covers over 100 tips & tools for unlocking the power of your iPhone / iPod touch. With this book you can pushing the iPhone and iPod touch beyond their limits.
[click to continue…]

Tips for Emacs Power Users

This is great post by Stevey Drunken about mastering Emacs text editor which is quite quite popular among UNIX hackers, computer programmers and power users:

Emacs is the world's best text editor. It's not just the best for editing program source; it's the best for any kind of text-editing. Mastering Emacs will make you more effective at writing and editing email, documentation drafts, blogs, HTML pages, XML files, and virtually everything else that requires any typing.

The tips in this little document are geared towards Emacs power-users. You should be familiar with the basics of launching and editing with Emacs, and you should already know the essentials of copying stuff into your .emacs file, and debugging things (or finding a friendly Emacs Wizard) when something goes wrong.

=> 10 Specific Ways to Improve Your Productivity With Emacs

How to Access Network When Everything Else is Blocked

There is a program called Ping Tunnel to send TCP traffic over ICMP. From the project home page:

Ptunnel is an application that allows you to reliably tunnel TCP connections to a remote host using ICMP echo request and reply packets, commonly known as ping requests and replies. At first glance, this might seem like a rather useless thing to do, but it can actually come in handy in some cases. The following example illustrates the main motivation in creating ptunnel:

Setting: You're on the go, and stumble across an open wireless network. The network gives you an IP address, but won't let you send TCP or UDP packets out to the rest of the internet, for instance to check your mail. What to do? By chance, you discover that the network will allow you to ping any computer on the rest of the internet. With ptunnel, you can utilize this feature to check your mail, or do other things that require TCP.

Absolutely fantastic -- it Just Works. Download ping tunnel here.

How to: Customize Ubuntu Linux

This guide will let you pimp you Ubuntu Linux to look like Windows Vista or Mac OS X. Linux is awesome.
From the article:

Changes are part of Nature so as with Technology, though this cannot be True for Windows and Mac cause the life cycle of a single Version is too much which is not the case with Linux. Open Source evolve at very rapid rate and with evolution comes new & special changes. Today with a hike in Linux acceptance its pretty hard for competitors to provide similar solutions at free of cost... I have tried to kept the guide as simple as I can so that even a newbie can understand how to make changes.There are few major changes in Ubuntu Themes and Icon Control Panel so please read carefully so that you can get everything....

How to: Customization Ubuntu Linux
=> Ubuntu Customization Guide v2

This is a classic problem. One of our FAQ is about cron job. I received lots of email with a question:

How do I run my script on 3rd Monday or 4th Friday only?

Cron does not offer this kind of facility i.e. you cannot run a script on the Nth weekday of the month.

However with one shell liner you can force to run a script on a given day:

Consider following date command, it will print day:
$ date +%a


You can compare output with weekday name using bash test [exrp ] syntax and the control operators && (AND list), you can write:
$ [ $(date '+%a') == 'Thu' ] && echo 'Today is Thu, run a command' || echo 'Noop'

First echo command get exectued only on Thursday. Now all you have to do is write a cron job to execute on first Monday:
# crontab -e
Now append code as follows:
# Run a script called myscript.sh on First Monday at 11:30:
30 11 1-7 * Mon [ "$(date '+%a')" == "Mon" ] && /path/to/myscript.sh

Hope this small tip will save your day. Please do share some of your favorite bash / shell scripting hacks in the comments. I will highlight some of the best in next shell scripting post.

See also: