Wednesday, 5 August 2009

vim tricks

Some tools are loaded with plenty of features and it's all too easy to get familiar with just a small subset of these features and forget or not explore the full functionality of the tool.

Take vim for example - it's an extended vi clone that comes with lots of vi extensions and improvements. I learnt to use vi back in the late 1980's and got settled into using enough functionality to be productive. Then I switched to using vim and never really put in all the effort to explore all the extra features it supports. Then this morning I stumbled upon this vim trick:

cmap w!! %!sudo tee > /dev/null %

which basically allows one to write over a file as sudo. Yes it's evil, but it it's also very helpful!

There are a whole bunch of other vim tricks listed at stackoverflow.com - I recommend checking it out as it contains some useful vim nuggets of goodness. I also recommend visiting viemu.com's vi/vim cheat sheet page - it has some excellent vi/vim keymap images.

Tuesday, 4 August 2009

Visit to Tog

I'm currently over in Dublin for a Developer Sprint and last night a bunch of us visited TOG - the Dublin Hackerspace. Monday is the micro controller night, and we had a look at some home brew Arduino (open hardware) projects. The visit is blogged about here and here. Steve Conklin has uploaded some photos of the visit on flickr. It's great to see some creative hardware hacking!




Sunday, 2 August 2009

No teeth!

I'm getting more confident and hence more adventurous in the way I fly my ESKY Lama model helicopter. I'm crashing it far less frequently and replacing the blades rarely now. Unfortunately this weekend I tipped it over at full power and did not pull off the throttle quickly enough and in doing so stripped a lot of teeth off the lower rotor gears.

The gearbox was covered in black plastic dust and debris - basically the brass motor gears had ground and stripped the plastic rotor gear teeth off in a fraction of a secound. Ouch!

This page has a lot of helpful info on how to repear this damage - it's quite a painstaking process and it's not a 10 minute fix. I'm now off to look for some stronger gear replacements.. ..and make sure I don't wreck the gears again like this!

Saturday, 1 August 2009

EtherApe - Network Analysis Tool

EtherApe is a helpful graphical real-time network connectivity monitoring tool that allows one to quickly see the open connections on the local network.

It supports a variety of devices, covering Ethernet, FDDI, Token Ring, ISDN, PPP and SLIP. Hosts and links between hosts change in size with traffic, and protocols are coloured according to the type of protocol.

To install on an Ubuntu system use:

apt-get install etherape

And run it as a root user using Applications->Internet->EtherApe (as root)

To capture Wifi network activity, select Capture->Interfaces->wlan0

Below is an example of EtherApe running on my laptop:


There is a per-protocol network summary viewable from View->Protocols (tick to enable) or by clicking on the "Prot." button - it produces output as follows:


There a quite a few tweakables, e.g. changing colours, selecting in/out bound traffic and timing and scaling of nodes and links. Also there are some hot keys controls such as pressing Alt-I to view just IP traffic and Alt-T to view just TCP traffic.

One can double-click on a node on the graph and EtherApe will drill down and display a per-node network activity summary, for example:


All-in-all EtherApe is useful little tool that can help one to check quickly on what kind of traffic is on one's network and to see where all the packets are going. Not bad at all!