After switching to Linux as my default desktop/laptop OS years ago, the one unsolved issue for me was effectively managing my iPods. Due to Apple’s closed nature and insistance on tightly controlling the user experience, managing iPods with anything other than iTunes is an ongoing pain. So in early 2013, I set out to find a replacement player.
I’d used the stock firmware for a while and had no feature issues with it. Then I noticed the device occasionally freezing, seemingly when coming across certain music files. Power button would not work, requiring a long select+power key press to restart. According to the release notes for the stock firmware update 01.02.18 (released in May 2013), it fixed an issue with the device hanging “after finished playing special mp3 files, which contain CRC error at the end of frames”.
Nmap includes useful functionality of listing MAC Address Vendor name during scans, but my version listed many as “Unknown”. The source of this information is a file called “nmap-mac-prefixes”, as discussed in Chapter 14 of the NMAP book. The upstream source is IEEE. Since NMAP doesn’t seem to provide a way to update the MAC prefix file outside of normal application updates (and my version of nmap was up to date), I wrote a quick and dirty script to handle this for me.
I’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.
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).
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.
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).
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.
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).
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.