I slipped

I slipped
You didn’t catch me, you’re slow in that respect
My nose bled and it painted my lips as would a lipstick
As I rose, the seams of my pants ripped

Red plotted and bare butted by design, it appears
Hysterical laughter where there should be tears
Tendency towards an eternal wobble that no one hears
Wishful optimist without detectable fears

I tripped
You pushed me to my five point hit
Cared not to elaborate on the details yet
My gift to you burnt through its box when shipped

Tending the bar of self promises stocked with non-brewed beers
Deprived of the life raft impulse of shifting gears
Unequipped with the red whistle as drowning nears
Still hopelessly undecided after so many years

Mail Exchanger (MX) Providers Market Share

I recently read an article that showed Google was the email provider for the majority of the top startups in US. This inspired me to find out, on a larger scale, which companies are the top providers of email across the whole Internet. However, what I ended up doing was to gather some stats on Mail Exchanger (MX) providers market share. The difference is subtle but important: an email provider offers a complete package where a customer is given an email address, an inbox where incoming emails are stored and a facility to send out emails. On the other hand, an MX provider only provides servers to receive emails. For example, they don’t necessarily provide storage (e.g. forward only).

The rest of this post documents how I went about it, the results and some other notes.

read the rest …

difftr — Diff Pentaho KTR files

I’ve been using Pentaho Data Integration (PDI) as part of my various jobs over past few years. PDI is an ETL tool that is often used for purpose of migrating data from one database to another. PDI runs scripts, in KTR format, which are directed graphs of steps, each of which manipulates the data rows that passes through them. For instance, an Add constant step adds new columns with constant values for all rows passing through it. PDI provides a visual development environment where these steps can be added and connected together as to make a program that takes a bunch of row + column data, manipulates them, and then outputs them.

Since KTR files are really just programs, they evolve and it is a good idea to keep track of their evolution using standard version control systems such as git. However, KTRs have an underlying XML format that is not persistent in terms of ordering of various elements, etc. Therefore, utilities such as diff are useless on KTRs. That’s why I decided to make a simple tool that would visually diff any two KTRs.

read the rest …

One for the team

Slapped and trapped the print in between
Hovered and suffered behind the seam
Coughed and roughed it up even further
Joined and coined this passage for the team:

Take a break
Make a mistake
Jump in the lake
Fight a snake
Ride an earthquake

Bake a cake
Eat a steak
Give it a shake
For heaven’s sake
Look at what’s at stake
And numb that ache
No matter what it’ll take

Make USB Flash Write Fast Again

I have a 64GB SanDisk Extreme USB flash drive that I use for just about anything. It is a USB 3.0 drive and at the time of purchase, it had the best performance out of all drives in the market.

I can’t remember how fast it was exactly when I first bought it but I remember the read speed was above 200 MB/s and write was above 150 MB/s. But yesterday, a year or so after purchase, I had write speeds of 20 MB/s sometimes falling to 6 MB/s. I wasn’t surprised as I knew at some point all the blocks will be written to and due to lack of support for TRIM, things will get slow — didn’t think that slow!

How do I know it doesn’t support TRIM? If I format and mount an FS with discard mount option and subsequently run fstrim /mnt where /mnt is the mount point of the volume, I get this:

fstrim: /mnt: the discard operation is not supported

OK, but not all hope is lost. I knew about ATA Secure Erase command. What if that works? Turns out it does and it works so well. I followed the kernel guide but here is a summary of commands I ran (change /dev/X to appropriate dev) for the impatient. I strongly recommend reading the full guide.

read the rest …

Add hyperlinks to PDFs made by Inkscape

Latest version of Inkscape supports exporting links now so no more need for this tool.


Inkscape despite being the most wonderful vector graphics editor program out there, has bummed me every time I tried to export something as PDF with hyperlinks in it. Inkscape does support adding links to arbitrary objects but in the conversion process to PDF, that metadata is lost. The reason for this loss (persumably) is that Cairo, a solely graphics rendering library used by Inkscape for outputting PDF, has no notion of object metadata. It just draws stuff to various types of canvas, like bitmaps, PDF, etc.

svglinkify demo PDF output

The final PDF generated by svglinkify which has clickable hyperlinks. See the source SVG file and the Inkscape exported PDF based on which the above is generated.

Being lazy (good thing) and not knowledgeable enough about Inkscape development, I set out to fix this problem quickly such that it can help me (and others) here and now, not in some unknown time in the future. This smells like it requires hackery and that’s exactly right. With less than 200 lines of python code, I made a very simple script that takes an SVG and a PDF of that SVG made by Inkscape, and creates a final PDF that has clickable hyperlinks. The SVG needs some simple treatment which is described in detail in the header comments of the python script. I have also made a demo SVG, and the PDF output of the script which can be seen on the right.

You can get svglinkify from my repo. You need python 2 or 3, qpdf and of course Inkscape to make everything work.

Qualcomm Quick Charge 2.0 protocol specification and support

I got myself a PureGear Extreme USB Wall Charger few months ago. It’s Quick Charge 2.0 (QC2.0) enabled. But it didn’t live up to the claims made by Qualcomm to charge from 0% to 60% in 30 minutes. So I figured either the charger wasn’t doing what it promised to, or my phone was the culprit. Gotta find out which.

In a non-QC2.0 charger that conforms to USB Charging Specification, a certain resistance is connected across the USB data lines. When a phone is plugged in, the phone measures this resistance to find out how much current it’s allowed to draw from the charger. The voltage is always 5V. Lower the resistance means higher maximum current draw allowed. A resistance of 0Ω means draw as much as you want.

read the rest …

Null Encounters

Lights are on
Curtains down
Corners of the room
Trenches for our doom

Cyanide in hand
Roll of nails on sand
Can of can’ts on the shelf
Sharp minds adrift

Second thoughts first
Tell and show oppressed
Yet agains yet again
Unknown, ruled a sin

read the rest …

Up my game

Up my game
Down-level an amount worthy of my fame
Disengage from the roaring torque of your engine
Disparage my opponents, call them names

Up my game
Reid this empty house, rape it with an emptier flame
Deceive me with your age old finest deceit
Revel as I break and fall to my knees

Up my game
Deplete the building desire to dismiss it as vain
Exert a microscopic effort to advance me
An extra breath for you, means the world to me

Up my game
Bear the burden that what you do is lame
Agitate your friends, and save me the calm you
Wholeheartedly laugh when pain is flowing through you

Up my game
Train me until I’m clean and tame
Play me, whisper to me who knows whom to blame?
Frame me with good intentions, a noble aim

Up my game
But quash the thought of me doing you the same
Bet on your life that for the rest of it you will regret
spending a single moment, upping my game

Up my game
I dare you
Are you game?

Touch Adapter Voice 2, silenced for good

We have a Volkswagen Polo that is a few years old. The bluetooth setup on this car is a disaster.

The car itself has bluetooth and it can play music over A2DP profile, make and receive phone calls over HFP profile and it can even download your phonebook and some more. Enter Touch Adapter Voice 2, a cell phone sized device that sits in a dock on the passenger side. Without it, the car refuses to connect to any bluetooth device. So you’d think leaving it in the dock is all that’s needed. Wrong. The Touch Adapter also has bluetooth, and just like a phone, it tries to connect to the car over it. But of course only one device can be connected at a time, so getting one’s phone connected is a gamble. I hear you ask: why the hell does the Touch Adapter need to talk to car over bluetooth? Who knows?!! It acts like a relay between the phone and the car. What? Relay bluetooth? Yep! Folks at Volkswagen are on something heavy. Did I mention that in the relay configuration, music playback is gone? Yep. I’m not even sure if it’s legal to advertise the car as A2DP capable when that functionality works only sometimes.

Touch Adapter in its dock. And no, this is not a self driving car without a steering wheel. We don’t sit on the wrong side of the car like some do. ☺

read the rest …