You are currently viewing all posts in the general category.

Music Organization with Beets

I organize my music with Beets.

Beets imports music into my library, warns me if I’m missing tracks, identifies tracks based on their accoustic fingerprint, scrubs extraneous metadata, fetches and stores album art, cleans genres, fetches lyrics, and – most importantly – fetches metadata from MusicBrainz. After some basic configuration, all of this happens automatically when I import new files into my library.

After the files have been imported, beets makes it easy to query my library based on any of the clean, consistent, high quality, crowd-sourced metadata.

$ beet stats genre:ambient
Tracks: 649
Total time: 2.7 days
Approximate total size: 22.4 GiB
Artists: 76
Albums: 53
Album artists: 34

$ beet ls -a 'added:2019-07-01..'
Deathcount in Silicon Valley - Acheron
Dlareme - Compass
The Higher Intelligence Agency & Biosphere - Polar Sequences
JK/47 - Tokyo Empires
Matt Morton - Apollo 11 Soundtrack

$ beet ls -ap albumartist:joplin
/home/pigmonkey/library/audio/music/Janis Joplin/Full Tilt Boogie
/home/pigmonkey/library/audio/music/Janis Joplin/I Got Dem Ol' Kozmic Blues Again Mama!

As regular readers will have surmised, the files themselves are stored in git-annex.

Mirrors on a bike are no different than mirrors on any other vehicle.

They aren’t a replacement for turning your head, but they can be a useful supplement for maintaining 360 degrees of awareness.

Drop Bar Mirrors

I purchased a pair of Sprintech Drop Bar Mirrors last spring. I had never used a bike mirror before, but I’ve grown fond of these over the past three months of use. The viewport is small, but adequate to identify vehicles of any size. I keep the mirrors canted outboard slightly, which means they move if I lean the bike up against a wall. Sometimes I’ll bump one when straddling the bike at a stop light. But they’re easy to move back into place, and I’ve never had them move on their own – rough roads aren’t enough to rattle them – so I don’t mind this. Having never used any other kind of bike (or helmet) mounted mirror, I can’t compare them against their competition, but I think the Swiss are on to something with these. I’d buy them again.

Terminal Countdown

Termdown is a program that provides a countdown timer and stopwatch in the terminal. It uses FIGlet for its display. Its most attractive feature, I think, is the ability to support arbitrary script execution.

I use it most often as a countdown timer. One of my frequent applications is as a meditation timer. For this I want a 11 minute timer, with an alert at 10.5 minutes, 60 seconds, and 1 second. This gives me a 10 minute session with 30 seconds preparation and 30 seconds to return. Termdown makes this easy.

$ termdown --exec-cmd "case {0} in 630|30) mpv ~/library/audio/sounds/bell.mp3;; 1) mpv ~/library/audio/sounds/ring.mp3;; esac" 11m

An Offline Lexicon

dictd is a dictionary database server and client. It can be used to lookup word definitions over a network. I don’t use it for that. I use the program to provide an offline dictionary. Depending on a network connection, web browser and third-party websites just to define a word strikes me as dumb.

To make this go, dictionary files must be installed. I use the GNU Collaborative International Dictionary of English (GCIDE), WordNet, and the Moby Thesaurus. The GCIDE is derived from Noah Webster’s famous American dictionary. WordNet is a more modern (one might say “dry”) resource. The Moby Thesaurus is a public domain thesaurus originally built by Grady Ward. Between these three sources I can have a pretty good grasp on the English language. No network connectivity required.

I use a shell alias to always pipe the definitions through less.

def () {
    dict $1 | less
}

All-Purpose Cleaner

My all-purpose cleaner consists of:

I use this to clean my dishes, my shower, every surface in my apartment, and every part of my bike except the chain. About the only things I can think of that don’t get cleaned with this mixture are my body and my electronics. Previously I used a mixture of Bronner’s castile soap and water for all of these things, but Sal Suds is better at cutting grease. This makes it preferable for kitchen (and bike) duty. I saw no reason to keep two cleaners around, so I phased out the castile soap mix.

I mix this in a recycled 0.5 L glass bottle with a neck that has standard 28-400 threading, allowing me to add a sprayer. The half liter bottle lasts me roughly two weeks. A single batch costs me in the neighborhood of $0.25, meaning I spend somewhere around $6.50 per year to clean my things.

I go back and forth on the vinegar – sometimes I skip it and use 0.5 L of water instead. I don’t notice a difference in the cleaning performance, but I tend to use more of it when I skip the vinegar. Vinegar is an effective bactericide and, unlike with castile soap, there’s no harm in mixing it with the Sal Suds detergent, so I generally opt to put it in.

To measure the detergent I use an OXO Mini Angled Measuring Cup, which has proved a useful thing to keep around.

I soak produce in a solution of baking soda.

A study from the University of Massachusetts found that a baking soda wash can be effective at removing pesticides from the surface:

Surface pesticide residues were most effectively removed by sodium bicarbonate (baking soda, NaHCO3) solution when compared to either tap water or Clorox bleach. Using a 10 mg/mL NaHCO3 washing solution, it took 12 and 15 min to completely remove thiabendazole or phosmet surface residues, respectively, following a 24 h exposure to these pesticides… This study gives us the information that the standard postharvest washing method using Clorox bleach solution for 2 min is not an effective means to completely remove pesticide residues on the surface of apples. The NaHCO3 method is more effective in removing surface pesticide residues on apples. In the presence of NaHCO3, thiabendazole and phosmet can degrade, which assists the physical removal force of washing. However, the NaHCO3 method was not completely effective in removing residues that have penetrated into the apple peel. The overall effectiveness of the method to remove all pesticide residues diminished as pesticides penetrated deeper into the fruit. In practical application, washing apples with NaHCO3 solution can reduce pesticides mostly from the surface.

I use a dish washing basin with a drain filled with 6 liters of water (I’ve previously placed pieces of tape on the side of the basin to indicate water levels for 2, 4, 6, and 8 liters). The study’s 10 mg/mL NaHCO3 washing solution translates to 60,000 mg of baking soda for this amount of water, or about 4 tablespoons, which I dump in and swirl around a bit. Then in goes the produce. After 15 minutes I can just pull the drain, blast everything with some pressure from the faucet, and let it sit in the basin (with drain open) to dry until I get around to putting everything away. It is most important to perform this process on the Environmental Working Group’s Dirty Dozen, but the procedure requires such a low amount of effort that I soak any produce which is lacking a thick peel (like oranges) as soon as I get back from the market, regardless of its providence.

Bacteria is a different matter.

It should go without saying that I've sanitized my e-reader.

Trying to inject advertising into the reading experience is sick and sacrilegious. A privacy sticker from N-O-D-E covers the logo on the back of my Kindle, while a piece of tape sanitizes the front. Between this and my offline, DRM-free method of using the device, I enjoy the Kindle without the corporate mindshare.

Kindle at Lunch

Currently reading Bleeding Edge by Thomas Pynchon.

I've found a hand strap to be a useful addition to my e-reader.

I bought the TFY Security Hand Strap for my Kindle Paperwhite 18 months ago. It makes holding the e-reader for long periods of time much more pleasant – especially when reading in bed and holding the device up above my head. No pinch grip required. It doesn’t add noticeable bulk or weight to the Kindle, and I can ignore it completely when I’m not using it. Originally I went looking for some kind of case with a cover that could be folded into a more ergonomic shape to hold, but when this strap appeared in my search results I realized it was a simpler solution to the problem. The strap could probably be made with a wire hanger and some elastic webbing.

Kindle Handstrap at Lunch