Thursday, December 25, 2008

Coffee Roaster

Just received my christmas gift, and it's the gift that keeps giving.

Monday, December 22, 2008

Lovely art from a co-worker

Found this on the whiteboard next to my desk this morning...



... aww thanks.

Wednesday, December 10, 2008

My first fvwm module

I've been using FVWM for some time now, but have never tried writing any kind of modules to extend it. Yesterday I tried it out, and I've got my first working FVWM module.



I wrote the module in Perl, and you can view there source here. Basically what it does is capture window focus events, and will set the transparency of the window to whatever is set in a configuration file
pblair@laptop:~$ cat ~/.fvwm/fvwmPeteTrans.cfg
XTerm:0.60
The above config will set all xterminals to 60% opacity when the focus moves away from it, but will return it to complete opacity once focus returns to it.

You can add as many types of applications (one per line). For instance, Firefox has
$ xprop | grep CLASS
WM_CLASS(STRING) = "Navigator", "Firefox"
So you could either place "Navigator" or "Firefox" at the left of the colon.

To install the module, place it somewhere where the .fvwmrc ModulePath will find it, then place it into the StartFunction section:

AddToFunc StartFunction
+ I Module FvwmPeteTransFocus
+ I FvwmButtons
P.S. You need "xcompmgr" and "transset" installed. And be sure to change the absolute pathnames within the module to the respective locations on your system.

Tuesday, December 09, 2008

Guerilla Refactoring

In the world of software development, refactoring is the process of updating code (usually for the better). But the problem may exist where management sees the existing application as "good enough" and doesn't want to allocate any budget towards fixing what in their eyes "aint broke".

Enter guerilla refactoring.

I must admit that I fall victim to this. I find lots of things at work that could be expanded upon, or made better, which would drastically increase the use of the package, make it more robust, or simply more elegant and orthogonal. I ensure that it doesn't eat into my work time, and the end product is usually something that I will directly benefit from, but hopefully also something that will make someone else's life better/easier/simpler.

P.S. I recommend this podcast from NPR.

Long time no see

It's been about a year and a half since my last entry. I had lost complete interest in blogging and any self self congratulations that come with the territory.

But I'm starting to feel like I have more to share again, and I hope to see more posts here in the near future.

Thursday, December 06, 2007

Shiny new iPod

Received a third-gen iPod nano on Monday as a thank-you for some work that I've been doing (at work), and just finally got the thing working!

These third-gen buggers require that the iTunesDB be signed with the device's serial number.

First I had to find the serial number by doing a "find" on "/proc" and grepping for "usb". The device came up, and I simply "cat"-ed the file to get the serial number.

Then, I used gnupod to sign my DB, using the command:

mktunes.pl -m /media/IPOD/ --fwguid=$(cat ~/ipod.serial )
Presto-- songs! No need to iTunes (well.. I don't run windows or OSX), but I just need to figure out how to get video and calendars onto this, and I'm set-- woohoo!

Saturday, June 02, 2007

BGP + RBL == Scary?

Well, we'll see.

http://www.pch.net/documents/tutorials/maps-rbl-bgp-cisco-config-faq.html

It makes sense, but something in my gut worries me when the router is automagically null-routing based on a RBL. Maybe I don't grasp the power of it... I'm looking forward to any discussion on this at MAAWG.

Friday, June 01, 2007

A new house

Katharine and I bought a new house last week. I'd say more, but she already has.

Sunday, May 13, 2007

Change of view

This is entirely premature, but...

It looks like I'll be changing departments at work. The paperwork still needs to go through, but it looks like I'll be working in the Abuse department at work. I'm really looking forward to the change and the challenge. I was told that they need someone with both system-admin and programming skills, and that I suited that nicely.

With a mailbox count in the millions, email abuse (as well as abuse in other departments) is a critical aspect to the company. Untold dollars are wasted by abusers who eat bandwidth, annoy customers, ruin our reputation as a provider, etc etc.

Once things become official, I'll post more details. Until then, here's to counting the days!

Thursday, April 19, 2007

Children of Hurin

Just picked up a copy of the Children of Hurin from Book City earlier tonight-- It's been a while since I've had any time to read any fiction, and am really looking forward to this book. I only learned of it three days ago via radio, and was surprised by the low media attention that it has received-- I would imagine that following the critical hype of the LOTR films, that any new material from JRR Tolkien would be met by more attention.

Apparently not.

Saturday, March 24, 2007

Perl programmer, who me?

Yikes-- it's true. Just purchased Programming Perl, 3rd Ed., from Chapters and am starting to pick it up.

First impressions: It's a damned ugly language to work with, but is very flexible, so I understand why so many sys-admins love it; you can really hack together a quick and dirty application in no time flat.

We'll see how much I like it as time goes.

Saturday, December 30, 2006

Spammers... damned spammers

Here's a screenshot of a little python application that I wrote to manage some spammers on the system. I've 'sed'ed their domains to example.com, but it basically shows how many messages are currently queued on one of our outbound smtp servers.

Every shift, I run an application that monitors the queues, and when an individual account exceeds the maximum number of allowed egress messages, my application logs it, and removes it from the queue.

But, spammers are smart little buggers, so they of course create multiple accounts from which they spam a little bit from.

My software is smart enough that it keeps track of all found spammers from the past 30 days, and simplifies their email address, then compares that to all of the email addresses in the current out queue. If the simplified "known spammer" address matches any of the current addresses, then those current addresses are treated as a single address and their queues are aggregated. If the aggregate exceeds the threshold, then all messages are removed and the synonymous accounts are flagged as spammers for later termination.

Note: The addresses in the above screen cap are the ones that come out of the filter against the known/previous offenders. Only usernames that have been previously declared spammers are aggregated.

Oh, and here's a little graph showing the outbound message queue on a single server. The drop was when I started work that day.




Monday, November 06, 2006

New phone

Just replaced the broken phones with some non-broken ones. Attached are some pictures taken on them.


Wednesday, October 25, 2006

Python: Functional programming

I'm trying to get used to functional programming and I must admit, it's kinda fun!

Here's a trivial example using both generators, and built in functions to acheive the same result:

Thursday, October 05, 2006

Leslie Lamport

I just stumbled upon Leslie Lamport's website, which has electronic copies of most of his published work.

I've studied some of Lamport's work in the past (mainly in regards to Lamport Logical Clocks & totally ordered multicasting, etc) and was recently doing some digging to find out how & why he created the LaTeX extensions to TeX.

That was when I came upon his papers.. wow.

Friday, September 15, 2006

Graduate school

Katharine has submitted her final MRP to the school of graduate studies, and will do her oral defence in just under a week. Should all go well, then she'll have her MA.

This has gotten me thinking about my own future possibilites in graduate school. I have the marks, and just have to maintain my average with the requisite math courses (Calculus, Linear Algebra, Statistic) and my current courses.

I spoke with a professor with whom I'm aquainted, and I must admit that he's piqued my interest in pursuing a M.Sc at Trent.

This means that I'll have to pay higher attention to my studies, since I've (until now) been treating my B.Sc. as a terminating degree.

Wednesday, September 13, 2006

First day of class

New semester started up yesterday and I captured the telemetry of my drive. Below is a screencap from an internal application used to inspect data drom our onboard electronic recording device (nice name, eh?).

Saturday, September 09, 2006

kd-tree creation tutorial

I've started work on the walkthrough mentioned in my previous post. It doesn't touch on topics such as searches of the completed tree, but sticks to the theory behind the creation and balancing of the resulting tree.

The graphic(s) for the walkthrough were created using graphviz. I wrote a small utility module in python that is used by the tutorial to generate the images.

Friday, September 08, 2006

New school semester

Starting a new semester at school next week. Will be at school three days and at work three days, with Sunday off.

Will post more once classes have begun.



Here's a screenshot of some trip data aquired from a test device installed in my car.





I hope to post a demonstration of kd-trees using Python in the not too distant future. It should be fun.