To-do list for the next couple of weeks

1A. Learn and use CherryPy, jQuery, jQuery mobile

1B. Design a custom web interface and finally control an LED through it.

2. Learn how to use PWM for controlling the multi-color LED. Learn loops, functions, etc. in python. Can we run 2 different functions continuously in python, each controlling a different set of pins?


Learn about wiringpi and how communications with the GPIO pins is handled using C

Bash shell scripting gotchas

I hate scripting in bash (or other shells) since the syntax is so terrible and I can never remember how to start coding in it. Today I learnt of a simple trick to avoid the pitfalls of not having spaces before and after the [ ] used in if statements.

More on this is at SO: bash brackets

Why bash why? Why don’t authors of popular shells just adopt a common syntax like say, C for everything? Why must we learn a million different syntax-es?

On those lines, don’t get me started on perl syntax either … 😦

URL Links within Image Captions on the free

Somehow a simple

doesn’t work since server strips it out. What you have to do instead, is use single quotes (‘…’).

Isn’t this stupid? Took me a while to figure out. People suggested all sort of things like javascript in the footer.php section, plugins, etc. But all those things are for the self-hosted, not for

WordPress – why is this so complicated?

Mentioned here too: URL Links in Image captions

NB: Also see this: HTML Ignore

fail2ban – lifesaver!

borrowed from Gizmodo

Hacking attempts and DDoS attacks are commonplace. In fact, its been just a week since I setup my RPi as an always-on device, with sshd service running. Today, I opened up the authentication logs and found 100s of login failures over ssh, all coming from China. I installed fail2ban which seamlessly takes care of banning clients with repeated login failures. It is easily configurable via a simple config file.

The attacks seems to be from a Linux Malware called XOR.DDoS (details here: XOR.DDoS)

These are the IP addresses seen attacking my RPi:


(The number in the first column denotes the number of times the client has tried to connect and failed).

These are the messages in the auth.log:


Using ip2location, I traced them to:


Seriously! What are you trying to get from my RPi! Stop or I’ll have to send my attack cat to get you!


borrowed from rore@flickr

Everyone must install fail2ban (or equivalent) firewall programs for the always-on connected embedded devices like the RPi!

Raspberry Pi beginnings


Credit: Epic Zoe

I just got my first Raspberry Pi. I should have bought it 2 years ago! Well I’ve just started tinkering around with it and it seems cool. Its not as complicated as building your own board, loading customized firmware on it and hope everything will run the way it should. On the contrary, they’ve made it really easy to use. Let’s see if I can get something useful out of it.