Rick Cogley's Tech Logr

Short Technical Laser Bursts %%


Rick’s short, technical tip microblog built with Hugo, powered by Apex Up and monitored by Apex Ping. See also my fabulous repository at Github for this site.

13 Feb 2019


Today I easily renamed a large number of text files in nested folders with the zsh built-in zmv (man page in zshcontrib). Load it with autoload -U zmv. I ran it with -n to force a dry run until I got the regex right, and the final was: zmv -Q '(**/)(*).txt' '$1$2.md' (zmv -opt searchstring replace string) where -Q renames hidden files also, the parentheses around the search path and filename globs will put those in sub-expression variables, and the variables are then referred to as $1 and $2 in the replace string.

RC Logr 20190213 103149 - Today I easily renamed a large … Rick Cogley


Looks like darch is like dockerfiles for your dotfiles. I’ve been looking into how to use linux as a daily desktop, because I’ve only ever used it on servers. Darch looks like it solves problems like NixOS does, but without the drawback of it being so unique that you have to package many things yourself.

RC Logr 20190213 090300 - Looks like darch is like … Rick Cogley

12 Feb 2019


Succeeded in flashing a custom keymap to my HHKB with custom controller using qmk: install the build tools (assuming dfu), clone the qmk_firmware repo, duplicate an appropriate keymap in keyboards/hhkb/keymaps/, edit keymap.c, then from the repo root, run make clean, press the red button on the controller to switch it to prog mode, and finally run make hhkb:my_keymap_folder:dfu. The make does the rest; erasing, flashing and resetting. 😎⌨️

RC Logr 20190212 221517 - Succeeded in flashing a custom … Rick Cogley


Found out that I can make use of qmk to program my custom HHKB keyboard controller. I need to research it a bit more, but it appears that I just have to make a keymap like this one and load it. ⌨️

RC Logr 20190212 175351 - Found out that I can make use … Rick Cogley


Vnote (donationware) and Standard Notes (premium edition option) seem like good options for note taking when you want to include images and diagrams and so on. Vnote has no iOS app but, I would guess you could sync via Dropbox etc, and use an app like omz Editorial to edit your files. Both are cross platform, and with both, the idea is to not lock you in to some proprietary format. Vnote has some vim bindings too. 🗂

RC Logr 20190212 112545 - Vnote (donationware) and … Rick Cogley

11 Feb 2019

🗓 "National Foundation Day" in Japan


macOS has a native hypervisor, called Hypervisor.framework. You can use full (and consequently heavier) apps like Virtualbox of course, but there is a lightweight alternative called xhyve, that leverages Hypervisor.framework, via which you can run linux on and configure with simple scripts.

RC Logr 20190211 134704 - macOS has a native hypervisor, … Rick Cogley

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