Rick Cogley's Tech Logr

Short Technical Laser Bursts %%


Here be my pithy, short, technical nuggets. Maybe I’m the only one who cares. Who says Hugo can’t be used for microblogging‽

09 Feb 2019


I installed the TMK programmable controller into my PFU HHKB Happy Hacking keyboard, and it works a treat. After a basic test, you create your map online and download the resultant unimap.hex file from that page, switch the ‘board into program mode using the red button on the controller, and then do dfu-programmer atmega32u4 erase --force, dfu-programmer atmega32u4 flash unimap.hex, and dfu-programmer atmega32u4 reset. After that, it just works. I put an English keycap set on this originally Japanese keyboard, so that I can have arrow keys, since PFU does not sell an English HHKB with them. Many thanks to Hasu!

RC Logr 20190209 145421 - I installed the TMK … Rick Cogley


In shell scripting, besides the canonical way of checking a variable using [ -z = $1 ], you can also check using a kind of shorthand which is pretty portable; the noop colon, like so : ${1?ERROR specify the arg} 🍻

RC Logr 20190209 120213 - In shell scripting, besides … Rick Cogley


In bash shell scripting, you can conveniently extract substrings using its parameter expansion or substitution feature. For instance, if you have a variable mydate=2019-02-09, you can extract the year by doing year=${mydate:0:4}. Search for “bash parameter expansion” to see the many options, which might work in your preferred shell as well. 😎

RC Logr 20190209 113930 - In bash shell scripting, you … Rick Cogley


Twurl is an OAuth-enabled curl-like app written in ruby, to let you easily use the Twitter API from the command line. I’m now using it to tweet these micro posts (oh how meta) after I generate and deploy them. See Twitter’s repo. 🐦

RC Logr 20190209 112502 - Twurl is an OAuth-enabled … Rick Cogley

08 Feb 2019


Vantablack is an incredible Nanotube-based substance which absorbs 99.965% of visible light (get the decimals right brah). In essence, it tricks your senses into thinking three-dimensional objects are two-dimensional. You can buy a watch that uses it for 90-thousand odd dollars, but Vb is not commonly available. Mere mortals can buy Black 2.0 and have a play, though.

RC Logr 20190208 091446 - Vantablack is an incredible … Rick Cogley

07 Feb 2019


Got my Elgato Stream Deck and it is pretty slick. It is definitely a streaming centric device, but, it also lets you execute arbitrary apps. If you need to execute, say, a shell function, make and save an AppleScript to load the function after you source your environment. Like cd $HOME && source .zshenv && source .zprofile && source .zshrc && myfunction. Then just add an “open” type button, and open your saved AppleScript app with it. Pressing the button should execute the script. It worked to open the editor for this post anyway.

RC Logr 20190207 180923 - Got my Elgato Stream Deck and … Rick Cogley

06 Feb 2019


Another discovery today was the Dat Project, a peer-to-peer protocol that combines the best of git, bittorrent, and Dropbox, to allow you to share and version files of any size. 🗳

RC Logr 20190206 173434 - Another discovery today was … Rick Cogley


Cronitor looks like a slick service, designed to monitor and alert you when a cron job fails, when an API is down, or when a pipeline is simply taking too much time. Nifty! 🤖

RC Logr 20190206 171645 - Cronitor looks like a slick … Rick Cogley

05 Feb 2019


Yesterday I learned about so-called “macro pads”, which are small programmable keyboards about the size of a number pad. People use them to store key macros used in various apps (so that it is one touch to do some action), and there are even ones with little LCD or OLED screens that can be programmed. See the elgato Stream Deck, the Infinitton and the MAX Keyboard Falcon-20 RGB.

RC Logr 20190205 131746 - Yesterday I learned about … Rick Cogley


I love the utility jq from stedolan. It is so useful in day to day terminal activities, that I don’t know what I’d do without it. Even for a super simple task like pretty printing the stdout from some tool (that outputs json in a raw clump), it is useful. theutil | jq

RC Logr 20190205 130916 - I love the utility jq from … Rick Cogley

04 Feb 2019


TIL about the concept of a warrant canary, with which an org states the absence of any secret gov’t subpoena. For privacy’s sake, I hope it remains legal to state that you have not been served…

RC Logr 20190204 180330 - TIL about the concept of a … Rick Cogley

03 Feb 2019


I’m going to try dotbot for managing my dot files. I really need a quick and easy way to install them on any mac or *nix machine I happen to need to use. 🤖

RC Logr 20190203 073809 - I’m going to try dotbot … Rick Cogley


Made by the same fellow, Hasu, who also makes the programmable replacement control board for HHKB keyboards, there’s also his USB to USB Keyboard Converter, which is a USB dongle that you install between your keyboard and your computer. It works to make some keyboards programmable.

RC Logr 20190203 071418 - Made by the same fellow, Hasu, … Rick Cogley

02 Feb 2019


Hugo, my static site generator of choice, just released version 0.54.0, kompleat with pedantic semver rule compliance. Hopefully this post will generate, because it is getting generated using this fresh, new version. 😅

RC Logr 20190202 193900 - Hugo, my static site generator … Rick Cogley


I’ve ordered a cool programmable controller for PFU HHKB Happy Hacking keyboards from Hasu. You can remap the keys, so that no matter what system you connect to, it is set up in your expected configuration. This way, I can use a Japanese HHKB with its arrow keys, as an English keyboard; something PFU does not sell. To go with, I also ordered a replacement English keycap set. I love the Topre switches, but keycap choices are severely limited.

RC Logr 20190202 145014 - I’ve ordered a cool … Rick Cogley

31 Jan 2019


Sometimes you need a timestamp in a shell script, for example if you need to calculate the hmac signature for a payload you received from a web service. In Linux or Mac, you can do date -u +"%s" or date -u +"%s.%N" if you need the nanoseconds. Use Gnu gdate from brew on Mac because its stock date does not support %N. The -u tells it to return UTC, which you can leave off for local time. If you need to force a timezone, use something like TZ=":Japan" date +"%s". The result looks like 1548931141 or 1548931220.112871000.

RC Logr 20190131 193007 - Sometimes you need a timestamp … Rick Cogley

30 Jan 2019


Did significant changes to my Keyboardio Model 01 layout, putting the shifts under my pinkies and the backspace at upper left. It is mentally stressful to switch between laptop and the Model 01 and a PFU Happy Hacking Keyboard. See the latest layout.

RC Logr 20190130 194251 - Did significant changes to my … Rick Cogley


Got word from my ISP that a backup had a bunch of files with suspected malware (uh, why did they suddenly discover it now?!). I deleted the files in the backups, got the list of paths, pasted to Excel, used MID() to extract the file ids, appended double quotes by concatenating char(34), did a transpose to horizontal, copied the row out to an editor, then replaced the spaces with commas. Then, I put that string of id’s in a database query to filter the attachment records and delete them, like In(RecordId(),"1111111","2222222","3333333"). Malware b-gone.

RC Logr 20190130 110922 - Got word from my ISP that a … Rick Cogley


My Keyboardio Model 01 surely has some DNA from the Esrille New Keyboard from NISSE. The Esrille is beautiful and ready to support a Japanese layout, but is eye-wateringly expensive, and its firmware is probably not as flexible as the Model 01’s.

RC Logr 20190130 092746 - My Keyboardio Model 01 surely … Rick Cogley

29 Jan 2019


It’s been a looong time since I soldered anything, but the Helix ortholinear (grid) keyboard kit has my interest piqued. The kits are made and sold by Yushakobo here in Japan, and they recently opened an actual shop in Akihabara too.

RC Logr 20190129 233930 - It’s been a looong time … Rick Cogley