TPCalc for Android

A while back, I made a little program called TPCalc to do one of my favorite mundane activities, which is to determine the best price for toilet paper at

Password Management and Two Factor Authentication: LastPass and Yubikey

LastPass is a password management add-on for web browsers and mobile phones. Yubikey is a 2-factor authentication device that pretends to be a usb keyboard, and types a one-time password when activated. LastPass integrates with Yubikey, protecting your password vault.

The integration is smooth, and I like it, but there's a risk if you lose the Yubikey, or it breaks. One fix is to buy two Yubikeys, and store one in a safe place.

Creating Email Messages with Clickable Links that Add Events to Your Calendar

This is a research node to find out the best ways to create email messages that contain event information, so that the user can easily create a calendar item.

The stock advice is to use .ics files, yet I don't see many event publishers using .ics files. Instead, I see people using well-formatted text, which gets automatically linked by email clients. I'll look at both methods.


Courier IMAP and POP3D Certificate Chains in PEM files

It wasn't entirely clear to me how to deal with these low-cost SSL certificates like the Comodo Positive CA SSL certificate. They come to you with several CRT files.

I Was Robbed of Bitcoins at MtGox: Good Passwords and Site Trust

Enforcing strong passwords is a good policy, because it increases users trust in your site. I think the same applies to 2-factor authentication.

Simplifying NTFS File Permissions

I've avoided NTFS file permissions for the better part of two decades. First off, I'm not an enterprise admin, and secondly, it seemed like every network I came across had virtually no permissions. Unix, which has a primitive permission system, was usually more "locked down" in most cases.

Lately, though, there have been some mean malware in the wild, including one that encrypts your data, and then charges a ransom to decrypt it. Imagine that getting into your file servers. Yikes.

One corrective is to use those file permissions to protect your files from changes.

Button to Scroll to Top of the Page

Mobile websites all seem to have this button, which appears when you've scrolled down a bit. The button scrolls you back to the top of the page, where most of the menus reside.

Upgrading to a Larger Hard Disk, using Windows Software RAID 1 (Mirroring)

Technically, you can't extend a mirrored volume, but you can break the mirror and extend it. Then, you can re-build the mirror.

Here's how to upgrade to a larger disk, using mirroring to copy the data over. I'm going to assume you want to go from a single disk to two larger disks: a spare disk is cheaper than dealing with hours of disk recovery in the event of a crash, no matter how rare crashes are.

Start by making a full backup of your disk to an external drive.

Install one new disk and making a mirror onto it.

A Long Explanation of Character Encodings and UTF-8 and the IMC Software

This was posted as a correction to a note I made about some character encoding errors that appeared on the LA Indymedia website. It's poorly written. If you need me to edit and clarify, send an email to

It's ISO 8859, not 8890.

Create JavaScript Functions from Strings: Code Generation

One of the less-used features is the Function() object, which can turn a string of Javascript code into a function. This is an example of how it can be useful.

I recently hit an annoyance with the Android browser. Around version 3 and 4 of Android, the browser stopped supporting the JS history.pushState() and history.replaceState() methods, basically killing my LA IMC JS app.

Just to verify, I wrote the following to test the existence of those objects:

if (history) {
  document.write("history supported<br />");
if (history.back) {

Discover the IP Address of a Cisco Aironet 1200 Series on Linux without IPSU

I got an Aironet 1200 and didn't have the serial cable, so I tried to use IPSU to find the IP address. I ran it in a VM, bridged the ethernet interface, and it failed.

Improved Logging for Very Slow SQL Queries: add Backtraces

MySQL has a feature to log slow queries, and it's nice, but the problem is, a lot of the queries look alike. So what you want is a backtrace so you can find the code that created the query. This is a modification to (pretty much) any db abstration layer. What you do is log each query, and generate backtraces if the execution time is long. If a script doesn't have any slow queries, the logged query is deleted.

How to Install Postfix on Ubuntu

(argh, forgot to back up my postfix work. i have to start fresh, so this is an opportunity to document work.)

# first get a superuser shell with sudo
sudo -s

apt-get install mailutils
apt-get install postfix
apt-get install mailman
apt-get install spamassassin
apt-get install courier-imap
apt-get install courier-imap-ssl
apt-get install courier-pop
apt-get install courier-pop-ssl

# unfortunately, we need to install apache2 because we're going to install
# the roundcube mail client

apt-get install apache2
apt-get install roundcube

One-Liner to Install Java JDK into /usr/local/bin

There's a zillion ways to do it, and editing $PATH is probably the best, but I didn't want to do that, so I did this:

for i in ` ls /usr/local/java/jdk1.7.0_21/bin/ ` ; do echo $i ; ln -sf /usr/local/java/jdk1.7.0_21/bin/$i $i ; done

That symlinks all the stuff in bin into /usr/local/bin, which is already in the $PATH.

Using Mutt to Read Spam and non-Spam Messages, and Train Spamassassin

This explains how to set up your server to go over email messages that have been rejected as spam, and then help train the Spamassassin Bayesian filter to correctly identify these messages.

Syndicate content