tinyapps.org / blog

Working with CSV files from the command line #

csvkit is a suite of utilities for converting to and working with CSV. Tools include:



Output (and Analysis)

(via author's comment on a blog post about parsing CSV files with the standard *nix tools: "Just a heads up that most of these commands will fail with non-trivial data because CSV files can contain rows that span multiple lines. I wrote csvkit to solve exactly this problem: http://csvkit.readthedocs.org/en/0.8.0/ Similar commands, but it handles CSV format correctly.")

/nix | Aug 27, 2014

Beautiful new software firewall and network monitor #

GlassWire is a network monitor and firewall for Windows with a lickable UI:


Only downside appears to be that outbound connections from new apps are not automatically blocked.

On a related note, I recently tested a number of firewalls with Comodo's HIPS and Firewall Leak Test Suite; the only product to pass all tests with virtually no setup or configuration was SpyShelter Firewall (though I didn't test Comodo's own fireall product; the download was over 230MB, compared to SpyShelter's 10MB).

(via Hacker News)

/windows | Aug 25, 2014

The Five Principles of Liberty #

from Men Like Gods by H.G. Wells:
Every young Utopian had to learn the Five Principles of Liberty, without which civilization is impossible. The first was the Principle of Privacy. This is that all individual personal facts are private between the citizen and the public organization to which he entrusts them, and can be used only for his convenience and with his sanction. Of course all such facts are available for statistical uses, but not as individual personal facts. And the second principle is the Principle of Free Movement. A citizen, subject to the due discharge of his public obligations, may go without permission or explanation to any part of the Utopian planet. All the means of transport are freely at his service. Every Utopian may change his surroundings, his climate and his social atmosphere as he will. The third principle is the Principle of Unlimited Knowledge. All that is known in Utopia, except individual personal facts about living people, is on record and as easily available as a perfected series of indices, libraries, museums and inquiry offices can make it. Whatever the Utopian desires to know he may know with the utmost clearness, exactness and facility so far as his powers of knowing and his industry go. Nothing is kept from him and nothing is misrepresented to him. And that brought Mr. Barnstaple to the fourth Principle of Liberty, which was that Lying is the Blackest Crime.

Crystal's definition of Lying was a sweeping one; the inexact statement of facts, even the suppression of a material fact, was lying.

"Where there are lies there cannot be freedom."

Mr. Barnstaple was mightily taken by this idea. It seemed at once quite fresh to him and one that he had always unconsciously entertained. Half the difference between Utopia and our world he asserted lay in this, that our atmosphere was dense and poisonous with lies and shams.


[T]he Fifth Principle of Liberty in Utopia was Free Discussion and Criticism.

Any Utopian was free to criticize and discuss anything in the whole universe provided he told no lies about it directly or indirectly; he could be as respectful or disrespectful as he pleased; he could propose anything however subversive. He could break into poetry or fiction as he chose. He could express himself in any literary form he liked or by sketch or caricature as the mood took him. Only he must refrain from lying; that was the one rigid rule of controversy. He could get what he had to say printed and distributed to the news rooms. There it was read or neglected as the visitors chanced to approve of it or not. Often if they liked what they read they would carry off a copy with them. Crystal had some new fantastic fiction about the exploration of space among his books; imaginative stories that boys were reading very eagerly; they were pamphlets of thirty or forty pages printed on a beautiful paper that he said was made directly from flax and certain reeds. The librarians noted what books and papers were read and taken away, and these they replaced with fresh copies. The piles that went unread were presently reduced to one or two copies and the rest went back to the pulping mills. But many of the poets and philosophers, and story-tellers whose imaginations found no wide popularity were nevertheless treasured and their memories kept alive by a few devoted admirers.

/misc | Aug 09, 2014

Japanese study tools #

/windows | Aug 04, 2014

Restore correct JPG file creation date from EXIF data #

File creation dates get mangled all too often, as when clicking and dragging images out of iPhoto. Here's a simple way to restore the correct dates using the embedded EXIF data and the venerable jhead (first mentioned in this space back in 2005):
$ jhead -ft /path/to/borked/images/*.jpg

/misc | Jul 28, 2014

Excel: Delete/remove blank/empty columns #

Or rather, delete columns that are blank or have data in the first/header row only. Tested in Excel 2003 (Windows) and 2011 (Mac).


  1. Open spreadsheet in Excel
  2. Tools > Macro > Visual Basic Editor
  3. Paste the macro shown below (created by AnitaPita with a hand from jbeaucaire)
  4. File > Save
  5. File > Close and Return to Microsoft Excel
  6. Tools > Macro > Macros
  7. Click Run (if you have other macros in the spreadsheet, you'll need to select "DeleteROPBlanks" first)


  1. If your copy of Office 2011 does not have VBA installed, you can add it by running the installer again, choosing Customize, and then checking only "Visual Basic for Applications"
  2. Open spreadsheet in Excel
  3. Excel > Preferences > Ribbon > check Developer > OK
  4. On the ribbon menu, click Developer > Editor
  5. Insert > Module
  6. Paste VBA code shown above and then close Module window
  7. Macros > Run (if you have other macros in the spreadsheet, you'll need to select "DeleteROPBlanks" first)

/windows | Jul 24, 2014

An ergonomic, mouse-free Mac setup #

Until one of the aforementioned split keyboard/mouse devices becomes available, Shortcat and the Freestyle2 keyboard make a great ergonomic team.

/mac | Jul 13, 2014

Split keyboards that also function as mice #

Hopefully one of these (or something similar) will be available soon:

combimouse - Combination keyboard and mouse:

KeMice - Split keyboard that also acts as a mouse:

/misc | Jul 13, 2014

Portable Thunderbolt to USB 3.0 adapter #

Kanex delivered on their promise to ship a Thunderbolt to USB 3.0 / eSATA adapter by late June. I received one the other day and ran some benchmarks on a Late 2011 MacBook Pro (2 USB 2.0 ports and 1 Thunderbolt port) running OS X 10.9.4:

USB 3.0 Hard Drive
Interface Read Write
Onboard USB 2.0 port 33 MB/s 26 MB/s
Thunderbolt-USB 3.0 adapter 101 MB/s 100 MB/s

USB 3.0 Solid State Drive
Interface Read Write
Onboard USB 2.0 port 35 MB/s 29 MB/s
Thunderbolt-USB 3.0 adapter 238 MB/s 225 MB/s


/mac | Jul 05, 2014

Sitting quietly, doing nothing #

Blaise Pascal, 17th century:
All of humanity's problems stem from man's inability to sit quietly in a room alone.1

Researchers, 21st century:

Most men would rather shock themselves than be alone with their thoughts.2
  1. From his collection Pensées (Thoughts): "J'ai dit souvent que tout le malheur des hommes vient d'une seule chose, qui est de ne savoir pas demeurer en repos dans une chambre." Another translation from Pascal's Pensées: "I have discovered that all the unhappiness of men arises from one single fact, that they cannot stay quietly in their own chamber."
  2. One way to find more joy in silence than in shocks: 10-day Vipassana Meditation retreat

/misc | Jul 04, 2014

Subscribe or visit the archives