loadI’ve been running a personal blog since the late 90′s with the current iteration since 2007. Over the years, I’d tried a few different comment spam prevention solutions, since 2010, I’ve been using Akismet almost exclusively. For the most part, it’s been over 99% effective, typically letting through just a few spam comments per month. On Thu, April 11, however, started getting an unusally high number of notifications from WordPress about comments in the moderation queue awaiting approval.

Read the rest of this entry…

Here’s one way to open multiple Chromium browser windows using the shell, with each window using a separate temporary profile, and with each window using specified dimensions (in this example, windows are sized such that two rows of three windows will fill a 1920×1080 display).

Read the rest of this entry…

Let’s say you have a bunch of files in a single directory you’d like to organize them in directories by date. Here’s one way to do it using a shell script.

Read the rest of this entry…

One way is to grab the number of seconds from /proc/uptime, then discard everything after the decimal (since Bash can compare integers but not floating point numbers).

Read the rest of this entry…

I use a couple of different methods for this, depending on whether I’m writing a new script and want to benchmark different approaches or need to debug an existing script to identify slow sections.

Read the rest of this entry…

Got a Dell Inspiron 14z with a 500GB SATA hard drive and a 32GB SSD mSATA card. Laptop came with Windows pre-installed on the SATA HDD with the SSD serving as a cache using Intel’s proprietory caching mechanism called Smart Response Technology (SRT). My objective was to keep Windows 8 and install Linux alongside it. Since it essentially has two hard drives, there are a couple of ways to go about dual booting. I decided to keep it simple and use each drive dedicated to each OS — leave Windows on the big HDD (500GB SATA) and install linux on the smaller SSD (32GB mSATA card).

Read the rest of this entry…

Typically, when making changes, I try to git commit as soon as I finish making changes. This way, when trying to track down regression days later, I can correlate regression with my change commit timestamps. The other day though, I made some changes, rsynced changed scripts over to the server, tested for regression, but it wasn’t till days later that regression evidence surfaced. When I looked at my git logs and realized that I hadn’t commited that change, I wanted to commit with the date of the change (by default, only the commit date will be used). This turned out to be a bit harder than I thought, so I’m documenting the steps for future reference.

Read the rest of this entry…

Here’s one way to test age of an AWS (Amazon Web Services) instance in a shell script. The process below does the following:

  • Uses ec2-describe-instances to get instance launch time from Amazon (requires EC2 API Tools)
  • Converts time stamp to syntax suitable for the date command, then uses that to convert AWS launch time to seconds since 1970 format
  • Gets current system time in seconds since 1970 format
  • Calculates instance age in seconds
  • Depending on age, displays it in seconds, hours or days

Read the rest of this entry…

Some examples of adding commas as thousands separators using awk and printf.

Read the rest of this entry…

Picked up a 8 GB Sansa Clip+ for 30 bucks, transferred my wakeboarding playlist over and found that it won’t play AAC files. For now, decided to stick with factory firmware and simply convert the few AAC files I had in the playlist to MP3. Below is a list of things I tried and what I ended up using.

Read the rest of this entry…