Reading HTML e-mail with Mutt
Posted: 25 January 2012 Filed under: productivity, ubuntu | Tags: e-mail, mutt Leave a comment »Glory be! It’s pretty easy to get nicely formatted output of those sneaky HTML e-mail messages (which all the young Internet kids are sending nowadays).
In your ~/.mailcap, if you use w3m (as I do):
text/html; w3m %s -o display_link_number=1; nametemplate=%s.html
text/html; w3m -dump %s -o display_link_number=1; nametemplate=%s.html; copiousoutput
And in your ~/.muttrc:
auto_view text/html
The Debian Administration site tells you how!
Swedish Man caught splitting atoms in his home
Posted: 3 August 2011 Filed under: productivity | Tags: security, wow Leave a comment »"Richard Handl told The Associated Press that he had the radioactive elements radium, americium and uranium in his apartment in southern Sweden when police showed up and arrested him on charges of unauthorized possession of nuclear material."
Which directories were archived? Command-line
Posted: 27 July 2011 Filed under: productivity | Tags: command line, linux Leave a comment »I archived a directory. It took two hours, then exited with a non-zero exit status (that means an error). Hmm — I was just testing something; I only cared if certain specific subdirectories were present in the archive. So I needed a way to look deep inside, quickly, and find those particular directories.
GNU tar will let you “test” an archive with -t, but I only wanted a list of the directories archived. Then I wanted that sorted. So…
$ nice tar -tjvf data.tar.bz2 | tr -s ' ' | cut -d' ' -f 6- | cut -d / -f -2 > tardirs.txt
$ uniq tardirs.txt > tardirs_uniq.txt
$ sort tardirs_uniq.txt > tardirs_uniq_sorted.txt
The -tjvf arguments to tar let you look inside, the “tr” command collapses adjacent spaces so that the first “cut” command will output only the sixth (file) field, and the second “cut” command will reduce a directory like “folder/folder/folder/fun.txt” to “folder/folder.” Then “uniq” will remove non-unique names.
Alternating row backgrounds / conditional formatting in OpenOffice.org
Posted: 26 May 2011 Filed under: open source, productivity | Tags: openoffice.org Leave a comment »Have you put together an OpenOffice.org table in OpenOffice.org Calc, and wanted to display alternating backgrounds for easy reading? Well, there’s an easy way to do it.
The steps are:
- Create a style for every other row and call it “Even rows.” Make its background “Gray 10%,” or whatever other color and attributes you prefer.
- In your spreadsheet, select the range of rows you’d like to format.
- In the Format menu, click “Conditional Formatting…”.
- Choose “Formula is” in the first dropdown.
- For the condition itself, enter the formula
ISEVEN(ROW()). This formula tests if the current row in question is even or not. If it is, the condition is met and your style is applied. - For Cell Style, select the style you created back in Step 1.
- Click OK. There you go.
Split a file across multiple CDs or DVDs on Linux
Posted: 13 January 2011 Filed under: productivity, ubuntu | Tags: command line Leave a comment »Okay, so you very likely have the ‘split’ utility installed (it’s in the GNU coreutils package, so… very likely). If you want to burn a file to multiple media, but you don’t have kdar installed on your desktop… don’t worry about it. Just open a terminal and do:
$ split --bytes=600MB --numeric-suffixes filename.zip filename_part_
In my case, I have a 2.8GB file, but I only have 700MB CDs on hand for my burner. So this command will ensure that I get several 600 “megabyte” (1000 bytes * 1000) pieces, named “filename_part_00,” “filename_part_01,” and “filename_part_02,” et cetera.
Are distractible people more creative?
Posted: 12 October 2010 Filed under: productivity | Tags: creativity, focus, self-discipline Leave a comment »Are Distractible People More Creative? Jonah Lehrer, Wired Science
He says it right: “We need to be ruthless about throwing out the useless stuff.”
How do great authors write? And great painters paint? They focus. Distraction might flit an idea in your face, but it doesn’t have the power to lead anyone to great production. Just more distraction and dissipation.
Discipline, however, plays a much greater role:
“I write when I am inspired. Fortunately inspiration strikes every morning at 9 a.m. sharp.”
- Somerset Maugham
Bash pipe fun
Posted: 16 September 2010 Filed under: productivity | Tags: bash, command line, linux 1 Comment »How about “recursively look at a log of hostnames used to request my site content. Sort them and ensure that only unique ip address and hostname combinations are counted. Find how many use my ‘.biz’ hostname to land on my site”:
find . -iname '*ecommerce-host_log*' | nice cat | nice xargs cut --delimiter=' ' -f 1,4 | nice sort | nice uniq | nice grep \.biz | nice wc -l
I wasn’t sure which commands would be most processor-intensive, so I used “nice” liberally.
The opposite of love is being in a rush
Posted: 27 July 2010 Filed under: productivity | Tags: love, multitasking, peace, slowing down Leave a comment »After reading all of this article, I understand this to mean “Multitasking plus squeezing more in equals a gradual failure in our ability to love & empathize with others.”
###
“Your Brain on Computers: Hooked on Gadgets, and Paying a Mental Price“
Matt Richtel, New York Times, published 6 Jun 2010
“[Scientists] say our ability to focus is being undermined by bursts of information… While many people say multitasking makes them more productive, research shows otherwise. Heavy multitaskers actually have more trouble focusing and shutting out irrelevant information… and they experience more stress.”
I’ve been reading The Shallows by Nicholas Carr — that’s fascinating, as well.
Install a Java Virtual Machine (JVM) plugin for Google Chrome beta running on Ubuntu Linux
Posted: 9 December 2009 Filed under: open source, productivity | Tags: Google Chrome, linux Leave a comment »Interested in getting Java to work in the just-released Google Chrome on your Ubuntu install? You can always try linking directly to the plugin binary:
$ locate libnpjp2.so
/usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386/libnpjp2.so
$ sudo mkdir /opt/google/chrome/plugins
$ cd /opt/google/chrome/plugins/
$ sudo ln -s /usr/lib/jvm/java-6-sun-1.6.0.16/jre/lib/i386/libnpjp2.so .
Works for me!
Changing Office 2007′s default document format
Posted: 26 June 2008 Filed under: productivity | Tags: ODF, open standards 2 Comments »Recently at work we upgraded our office suite to Office 2007. By default, Office saves documents in a new proprietary format from Microsoft that is totally incompatible with previous versions of Microsoft Office. We deal with a number of people outside our organization who of course don’t have the kind of money to be forced to upgrade, so we simply changed our default file format to the previous .doc format.
Here are instructions on changing the default Word option; you’ll need to change it in PowerPoint and Excel in basically the same way.
- Open Microsoft Word 2007.
- Click the “Office Button” (found at the top left of your screen), and at the bottom of that list click “Word Options.”
- The “Word Options” window will open. Now click “Save” in the left panel.
- On the right-hand panel, change the top option which reads “save files in this format” from “Word Document (*.docx)” to “Word 97-2003 Document (*.doc).”
- Click “OK” and you’re done.
Screenshots:

The options button in Word 2007.

Setting the default file format in Word 2007.
You can also ask everybody else to download and install a converter for their Microsoft Office software, so they can open and read the documents you send them. But why not use the ISO-approved, vendor-neutral Open Document Format (ODF)?
Microsoft will be adding support for ODF soon to Microsoft Office anyway:
“ODF has clearly won,” said Stuart McKee, referring to Microsoft’s recent announcement that it would begin natively supporting ODF in Office next year and join the technical committee overseeing the next version of the format.
If you’re facing the choice to “lock” your data within a proprietary format, you should go into the decision with your eyes wide open. Know the reasons you’re placing your data into a format that you’re forbidden from modifying or extending. Be sure to look behind and through common buzzwords such as “open,” or the magic “XML.” Can you really get the data out of there? Or transform it however you please?


