Friday, 20 September 2013

Scratch Your Itches: Grabbing Siemens Gigaset sx762 modem stats with Ruby

Grabbing Siemens Gigaset sx762 modem stats with Ruby

The problem:

So, my Internet connection can be finicky at times; it has a tendency to collapse the download speeds to un-browsable levels at the worst possible times. At those times I usually just want to quickly find out if it's just the current speed that has dropped, if it's also the max speed, or if it's just my imagination.

Normally this means that I have to:
  1. go to the built-in web-interface of my modem (a Siemens Gigaset sx762);
  2. enter the modem's password;
  3. click through a 'Security Advice' screen that complains I have an ethernet connection connected to the modem;
  4. find my way to the Status page; 
  5. finally get to click on the link to the Internet statistics sub-page;
Once there I have to skim through the irrelevant data to find the stats I'm interested in.

Scratch that itch!

Needless to say I got tired of having to use the annoying web-interface and wasting my time clicking through warnings.  It was becoming one of those 'itches' I've blogged about before, and I decided it was time I'd do something about it!
So, I opened my favourite text editor (Textmate2), looked up the cURL manual, looked at the sent headers in the network tab of Chrome's element inspector and automated the process into a simple Ruby script: router_statistics.rb.

The code:

Scratch be gone!

Once I run this baby in my console, it will return the current and max Up- and Down-stream speeds (and noise levels), as well as my external IP and MAC addresses and uptime.

The code might be quick and dirty, but it's a nice hacky solution that will save me some time and frustrations. :)

Related searches on Google+:

#ScratchYourOwnItches   #coding   #Siemens   #Gigaset   #sx762   #FiXato  #FiXatoBlog   #Github   #FOSS   #OpenSource  #Ruby #cURL

Thursday, 12 September 2013

The Story of Saint Nick: David Sedaris - Six to Eight Black Men

I thought I'd do a repost of a 'quick' rant/discussion/background post on Sinterklaas / Saint Nicholas I did over on Google+, also to test out the new 'embed post' feature they got going on:
Originally posted on Google+ on the 8th of September 2013, as Google Plus will be shut down on April 2nd, 2019, I've replaced it with just the contents from that post:

The Story of Saint Nick: David Sedaris - Six to Eight Black Men
With the #kruidnoten , #pepernoten  and #taaitaai  already hitting the supermarkets even though the festival of #Sinterklaas  isn't till the 5th of December or a few weeks earlier if you count his arrival), I thought it would be a good time to share this comedy sketch by David Sedaris: (originally, but that one has been taken down)

Every year the Dutch confectionery associated with the arrival of Sinterklaas (Saint Nicholas/Nick; one of the original stories to inspire the Santa Clause figure) seems to be arriving in the supermarkets several weeks earlier than the year before and is frustrating quite some people. (Probably similar with Christmas trees and decorations being sold way before even Halloween in the USA.) While I still think it's silly, I no longer make a big deal of it and think they should perhaps just start selling it all year round.

David Sedaris' sketch isn't about this, but he describes a funny image of our Dutch tradition and sort of compares it to Santa Clause. It's only 15 minutes, so definitely give it a listen!

What I find the most interesting about the whole Santa Clause tradition is how it is based on various different stories from different cultures. From what I can tell Santa's present-giving to children is based on Saint Nicholas (a bishop of Myra, Turkey) and him being the patron saint of children and the various legends associated to that and the celebration of him during his nameday (6th of December).

Then there is Joulupukki, a Finnish Christmas figure whose name means Christmas Goat or Yule Bock/Goat and associated with Wōden from Norse mythology. It was said to wear red leather pants and a fur trimmed red leather coat, an outfit which was later probably merged with the appearance of Saint Nick. While the Coca Cola Company didn't invent the current look of Santa (,  their constant advertising and characteristic drawings by for instance Haddon Sundblom (a Finnish emigrants' son) did help instil his looks into several the generations growing up with him.

While Finland isn't really the North-pole, I can imagine that it inspired the flying reindeer pulling his sled, and all the snow, ice and cold is something that's also easily associated with the very desolate North-pole. Various Nordic cultures also love various trolls, elves, other fairy folk and dwarf-like humans and probably inspired his worker elves.

These elves at least don't bring on the yearly controversial discussions about whether or not Saint Nick's black helpers (the six to eight black men from David's sketch, commonly known as Black Petes / Zwarte Piet in the Netherlands) should be abolished because some groups consider them a racist symbolism. Even when some stories describe the Black Petes as being black from the soot from the chimneys they go through to deliver the presents, instead of Moorish slaves or friends of the bishop. 

Using elves as work slaves of course is no problem at all, because using non-humans for labour is very normal since they don't share the human rights. ;-) 

Perhaps we should've stuck to keeping Krampus as Saint Nick's helper, because using a fantasy figure is easier to accept, even when he punishes naughty children and puts them in his sack to carry them to his lair (instead of the Saint Nick and his helpers who put children in a sack and take them to sunny Spain! Oh, what a punishment!)
But I guess the wickedly awesome demon look of Krampus would be too expensive for our stingy Dutch culture, while a can of shoepolish is easier to get by. ;-) Which is a shame, because Krampus is an awesome looking beast! (

Oh, one final note: "whether you've been naughty or nice" doesn't necessarily mean whether you've been bad or good, since naughty historically also has a meaning of 'needy'; having nothing. Getting some coal for a fire when you have nothing could actually be a blessing, since it'd be quite nice to get something to keep yourself warm. Have a look at the definition at for some more about this word's origin.

So, that was quite a long post with a bit of history, some ranting, and a fair amount of thinking aloud, all mixed with quite a bit of rambling! Hope it wasn't too boring. ;-)

#christmas #SantaClaus #Sinterklaas #SaintNicholas #SaintNick #StNikolai #etymology #history #DutchCulture #Dutch #DavidSedaris #Comedy

The post used to come with a video of the reading of "Six to Eight Black Men" by David Sedaris, but as the video has been taken down since then, I've had remove the embedded video in the Google+ post. I've found a different version, but this one is split over the following three videos, of which the quality unfortunately is quite a bit worse…: