Hot, hot, hot. The weather has been unbelievably hot for the last few days, with the same forecast for the next week.
This is a screenshot from the weather part of my status bar, showing 42°C (107°F), on Australia Day, 26th January 2012, at 3:00pm.
In full, it shows the current temperature, “feels like” temperature, humidity, and wind direction and speed including gusts.
Filed under weather
I went to install Wireshark this morning and realised why I hadn’t bothered before. The source code is 20MB. God knows how long that will take to compile, especially since it seems to use autoconf and generates complex, multi-nested Makefiles many levels deep.
I already had tcpdump installed, so I used that instead. It provided what I wanted quite quickly after a bit of googling to find out the suitable parameters to start it up.
tcpdump -Xss 'port 80' > dump
-X prints the packet data (in hex and ascii) as well as the packet header
-S uses absolute packet numbers instead of relative ones
-s 0 captures the full packet (assuming 65535)
'port 80' only capture packets using outgoing port 80 (HTTP)
(This post is as much for my benefit as any one else’s, as I always forget which parameters to use.)
Addendum The reason for this is that I wanted to check if the Ghostery plugin for Google-chrome acts early enough to prevent a network connection to the blocked site, or whether it just prevents any display of the output from that site.
The point being that I block Facebook.net and I don’t just want to not see Like buttons, I want to prevent the browser from communicating with facebook.net in the first place.
I’m pleased to advise that Ghostery works the same as in Firefox and prevents any connection in the first place, so that Facebook, Twitter, and all the other privacy annoyances never find out that I have visited a web site.
Filed under wireshark tcpdump sniff network capture chrome ghostery
I have been looking for a command-line programmers’ calculator for a while. I needed it to do the usual things like base number conversion, bit shifting and masking, and so on.
I searched for quite a while and couldn’t find anything. Almost all were GUI, which I didn’t want, or were some ridiculous price, which I couldn’t justify being a programmer myself.
Anyway, I think I’ve found a good one, calcc. It comes with GPL’ed source plus pre-built binaries for unix and MS Windows. Theoretically, the unix version should work on a Mac with OS X, but I haven’t tested it.
I have written up a fairly comprehensive blog post on my other blog. Check it out.
(Why command line? If I am in the middle of a typing frenzy, the last thing I want is to have to move my hands away from the home keys to use the mouse to hover over a graphical keypad and click. I much prefer to Tab over to another window and keep using the keyboard.)
Filed under calculator programming
Interesting discussion on Hacker News about an interview with Bill Joy, creator of Vi.
Joy mentions that one of the most important use cases was that, in those days, everyone had only a 300 baud connection to the host. That meant the editor had to be efficient in screen repaints while interacting with commands from the user.
You would think that is no longer a consideration. Almost everyone has at least an ADSL connection.
It turns out that the more things change, the more they stay the same. That use case has come back.
The reason? People using smart phones to ssh into their cloud service (such as Amazon AWS), sometimes over a satellite link (while sitting in their yacht in the Bahamas… lucky bastards). Lag becomes important, and vi still fits the bill.
I like it. Perhaps a new goal for 2012 is to get myself in a boat/place where I can find out for myself how responsive vi is on a laggy connection.
Filed under vi ssh phone satellite vim
With India playing Australia at Sydney right now, and captain Michael Clarke on 325, I thought it would be interesting to look at the top ten Australian scores of all time (which Channel Nine has conveniently provided for us viewers).
Matthew Hayden is highest at 380, then Don Bradman at 334 (Leeds in 1930).
Looking further down, Don Bradman has four places in the top ten: 2nd, 7th, 8th and 9th. Incredible.
Here is the list:
- Matthew Hayden 380
- Don Bradman 334
- Mark Taylor 334
- Michael Clarke 325 (so far, still batting)
- Bob Simpson 311
- Robert Cowper 307
- Don Bradman 304
- Don Bradman 299
- Don Bradman 270
- Graham Yallop 268
There are some big names there. Apart from Bradman appearing four times, the surprise for me is Yallop with 268. I knew he was a fine batsman, but I had not realised he got those big scores.
Spent the last day or two doing Michael Hartl’s excellent Ruby on Rails tutorial.
I had a vague idea I wanted to learn Ruby, but once I googled for tutorials it became pretty clear that Rails was the way to go for web-based apps. Michael’s tutorial got lots of recommendations, so I jumped right in.
It is very good. I’m an experienced programmer, so the basics of setting up the environment weren’t much different from Python’s virtualenv and quite straightforward. Michael covers it in enough detail for even the beginning programmer.
The basics of database and HTTP were also covered and Rails makes it very easy, excitingly so as you don’t have to deal with any of the numbing complexity.
I’m about half-way through and enjoying it a lot. Recommended for beginners and pros alike.
Filed under rails ruby tutorial programming
Just a quick post to start things up here. Next is to set up a sub-domain on my domain to point to here, and set up Twitter so my tweets appear here (can Tumblr do that?).