Split PDF files
Another ghostscript trick to split a single PDF to multiple PDFs one for each page:
gs -sDEVICE=pdfwrite -dSAFER -o outname.%d.pdf input.pdf
Another ghostscript trick to split a single PDF to multiple PDFs one for each page:
gs -sDEVICE=pdfwrite -dSAFER -o outname.%d.pdf input.pdf
I drive once in awhile and even though I’d much prefer to rely on someone/something else to tell me where to go, I’ve decided to memorize directions rather than use a GPS navigation software. Instead of the why, I’ve listed my wishlist for GPS navigation software. If these are taken care of, I probably no longer have to look at street view for every turn and use pen and paper like it’s the 90s.
Lane navigation. A passenger familiar with an area giving you directions tends to mention which lane you should stay in well before the next turn so you won’t have to force your way onto the neighboring lanes at the last second and potentially cause an accident. This can be extended to take into account streets with lots of cross streets where people queue to turn to or streets where a lane is occupied by parked cars (both further dependent on the time of day). A lot of drivers, especially inexperienced ones, find changing lanes under pressure (ie upcoming turn) very stressful and are more likely to make mistakes doing it.
This command takes a bunch of images and makes a multi-page PDF out of them:
convert *.jpg -units PixelsPerInch -quality 100 \ -density 300x300 +repage out.pdf
Your happy face, your red and cyan shoelace
Your cream denim melting on your legs
My lightheadedness ever since
Plenty of poke prints on your back
You deflect the poke monster’s attack
My waving a white flag
Kiss after kiss but never in excess
Occasional gaze only to catch a breath
My hands, sound asleep on your waist
Sauce and cheese raining on your dress
The same dish with a wildly different taste
My forkless dining experience
Smell of morning grass through the windows
Lifting mist of feathers from battle pillows
My eyeing your cozy toes
The medalist in every trolley race
Fair play never on your conscious
My losses’ only ever cheering audience
Here’re some tips I’ve learnt over the years sharing apartments. Some are only applicable if you live in the state of NSW in Australia.
Few years ago, I got a job in a team which was building a search engine from scratch akin to a real-estate directory (but not exactly that) where a user searches for houses in a town and can filter based on criteria such as price, proximity to amenities, etc.
Due to an extraordinary degree of collective laziness, we decided against IaaSes and went with a PaaS we were familiar with, the GAE. Very early on we noticed that users would only ever search for houses around a certain area and so we would never look across the entire dataset. There had to be a way to capitalize on this and sure enough, we found it: there was no need for a backend. The dataset for a locality and its surrounding was small enough to be downloaded to the user’s browser and be interrogated there.
Mile range spottable, untoppable, cuddleable bunny
Sing your song at the top of your lung, make my day sunny
Mess up the setup and eat the punch for lunch and you're still funny
Wish the most vicious and it will taste as sweet as honey
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
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.
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.