Rick Cogley's Tech Logr

Short Technical Laser Bursts %%


Rick’s short, technical tip microblog built with Hugo, powered by Deno Deploy. See also my fabulous repository at Github for this site.

11 May 2020


If you are making DNS changes, you may want to flush your local dns responder cache, so here is how to do it. 🤖

On a modern Mac, put it in a shell function (c.f. zsh):

function flushdns (){
  echo "Flushing DNS, enter your user password if prompted:"
  sudo killall -HUP mDNSResponder
  sudo killall mDNSResponderHelper
  sudo dscacheutil -flushcache

On Windows, do this in a command prompt:

  > ipconfig /flushdns

On Linux, it can be app by app or, on Ubuntu/Debian, you can do either of:

  $ sudo systemd-resolve --flush-caches
  $ sudo /etc/init.d/dns-clean start

RC Logr 20200511 112219 - If you are making DNS changes, … Rick Cogley

10 May 2020


So Zoom acquired a beloved crypto app Keybase, and the announcement blog post is so fuzzy and laden with corporate double-speak, it feels almost certain that Zoom will sunlight the app. How unfortunate. Big windfall for @malgorithms and co, big fuck you to Keybase users. 🖕🏻

RC Logr 20200510 182623 - So Zoom acquired a beloved … Rick Cogley


Many static site generators like Hugo have a built in dev web server. If you are just building some html with css, and need a simple solution to serve the files from any folder, you have a few solutions. See a couple of options:

Node.js users can install and run http-server:

npm install -g http-server
cd /path/to/my/working/folder
http-server --help

Visit http://localhost:8080 and look at the help to change the port.

Python 3 users can run:

python -m http.server 8080

Or with php:

php -S localhost:8080

Then if you use zsh put it in a function in your ~/.zshrc:

function serve-it (){
  php -S localhost:8080

RC Logr 20200510 174559 - Many static site generators … Rick Cogley


An rsync command I was using in a git hook was giving an error regarding permissions not getting copied properly. I was copying to keybase kbfs, so it makes sense that it differs from standard Mac permissions. I fixed it by changing -a to -rlOtcv. 👍

In .git/hooks/pre-hooks:

rsync -rlOtcv  --exclude '.git' /Users/myuser/dev/myuser.keybase.pub/ "/Volumes/Keybase (myuser)/public/myuser/"
exit 0

RC Logr 20200510 173730 - An rsync command I was using … Rick Cogley


Twurl uses ruby and broke, so I switched to CLI tweeting via a little golang utility called «twty». 🤓

One of golang’s main ideas is to allow apps to be installed easily on any platform, without needing to hassle with dependencies (Ruby, Python, I’m looking at you here). It’s lovely. Assuming you have golang setup, you just do:

$ go get github.com/mattn/twty

… and boom.

RC Logr 20200510 062445 - Twurl uses ruby and broke, so … Rick Cogley

03 May 2020

🗓 "Constitution Day" in Japan


There’s a cool blocks-based editor project called «editor.js» that outputs clean json, which is predictable when integrating with other systems (similar to how Notion’s editor works). I was wondering if there is a list of sites that use it, or a showcase of some kind, and learned that I can view a list of repositories that use it, via the Github “dependency graph”. Slick! 😎

RC Logr 20200503 182144 - There’s a cool … Rick Cogley

28 Apr 2020


Today I upgraded a Drupal site with drush, a convenient cli utility for Drupal, but managed to munge the site up. Fortunately I followed the usual steps, and used ./bin/drush archive-dump to back up prior to upgrading. It gives you a “Backups were saved into /path/to/backups/2020…” message, telling you where the backups were saved. This is my usual procedure:

cd /path/to/drupal/site
./bin/drush archive-dump
./bin/drush ups
./bin/drush sset system.maintenance_mode 1
./bin/drush cr
./bin/drush up drupal
./bin/drush up bootstrap //(etc, for instance)
./bin/drush sset system.maintenance_mode 0
./bin/drush cr

The problem was, I upgraded to the latest without checking my php version, and the drush up failed with some weird error that some helpful soul posted about on Stack Overflow. Since upgrading php to 7.7 from my lowly 5.x is fairly involved, I just compared and restored the backup core files to the production site folder, and did:

./bin/drush cr
./bin/drush sset system.maintenance_mode 0
./bin/drush cr

That fixed it.

RC Logr 20200428 201445 - Today I upgraded a Drupal site … Rick Cogley

12 Apr 2020


Everyone is saying stay 2 meters apart and I mentioned this in a previous post, but research showed that COVID-19 virus can travel up to 4.5 meters. That’s something important to keep in mind.

So, correcting my earlier post, that’s one wavelength apart at 75 Mhz! Joking aside, that’s terrifying.

RC Logr 20200412 095433 - Everyone is saying stay 2 … Rick Cogley

29 Mar 2020


A geeky-funny Ham radio take on the idea of social distancing in this image from Twitter user @ai6yrham. 😂


λ = 300 / 𝑓 (in MHz)

Wavelength is c/𝑓 where c is the speed of light at 300,000,000 meters per second, so 300/144 ≅ 2 -ish. So stay 2m apart and stay safe, people.

RC Logr 20200329 154842 - A geeky-funny Ham radio take … Rick Cogley

20 Mar 2020

🗓 "Vernal Equinox Day" in Japan


We are not quarantined in Japan (yet), but here is an idea to squelch the boredom: get a radio that can pick up shortwave, and do some BCL or broadcast listening. Last night I heard Beijing news on «Peking Hoso 7220 Khz on 41mb» in Japanese, talking about Coronoavirus and newborn pandas! 🐼

I have a Tecsun S-8800 which is a well-regarded portable radio that will take external antennas if you want them, can receive FM, MW (AM), SW, LW. Tecsun makes the AN-200, an external AM antenna which you can connect with a stereo connector if your radio has an input for that, or (in the case of the S-8000) you just set behind the radio and tune via its knob. It’s pretty amazing and works to improve the sound of AM stations.

Other stuff I learned:

  • Some AM stations are also using “wide band” FM to transmit, so you get a much better sound.
  • There are tons of SW stations to check out, and shortwave will bounce off the ionosphere so you can hear it from far away (unlike FM or AM which seem to be regional). I heard a wide array of stations while surfing the SW stations, which were transmitting at night from Korea, China, Taiwan. A lot of news-sounding broadcasts, including Chinese lessons for foreigners on 7324 Khz.
  • SW’s hard to censor apparently, so a lot of people use it to transmit non-fake news from their countries.
  • Japan has news transmitted on SW out of various countries in Asia, in Japanese.
  • SW stations don’t transmit 24x7, and the Short-Wave.info site is easy to use to find what’s transmitting right now, and in addition has good basic info about this whole kaboodle.
  • If your radio or its remote can accept direct frequency input, you can input the station’s frequency instead of turning a dial again and again. Apparently SW radios have a main tuner knob that gets you to the main frequency area, then you use a fine tuning knob to clean up the signal.

RC Logr 20200320 114100 - We are not quarantined in … Rick Cogley

17 Mar 2020


I just love webhook.site. Simon Fredsted @fredsted has done such a great job on it, and the paid flavor is especially useful. 🤖🦾

It lets you set up a unique URL for receiving http actions POST, GET etc, and has a scripting language with which you can manipulate the inbound payload and take actions, parsing out json or xml. Really good stuff.

RC Logr 20200317 094234 - I just love webhook.site. … Rick Cogley


A little .gitignore tip: you can use regex to cover cases where reports you do not want in your repo have a date stamp. Nifty. 😎

# Diagnostic reports (https://nodejs.org/api/report.html)

RC Logr 20200317 092838 - A little .gitignore tip: you … Rick Cogley

12 Mar 2020


I tried using the Post feature in Slack, and found that pasting code is buggy, and that you cannot easily copy a Post from one Slack Space to another. Uglay. Why u so beta, Slack?! 🐞

RC Logr 20200312 092639 - I tried using the Post feature … Rick Cogley

12 Feb 2020


Read about this in the NY Times this AM - Prof Po-Shen Loh has re-introduced an ancient method for solving quadratic equations, which uses parabola symmetry as the key and provides cleaner proofs. Shh, squelch haters by not telling anyone that Babylonia was in present-day Iraq. 🤷‍♂️

RC Logr 20200212 142448 - Read about this in the NY … Rick Cogley

09 Feb 2020


Apple is deprecating «kext» kernel extensions from macOS 10.15.4. Check your /System/Library/Extensions or /Library/Extensions folders and follow up with 3rd-party software makers (think audio, firewall, USB driver, keyboard driver, antivirus). This means stronger security, but less hackability. 🍏

RC Logr 20200209 094156 - Apple is deprecating «kext» … Rick Cogley

08 Jan 2020


If you need to generate a uuid, say for a unique filename, on mac you can do it via the uuidgen utility. Combine it with tr to remove the punctuation, and use pbcopy to slap it on the clipboard if you need. 🆔

 uuidgen | tr -d - | tr -d '\n' | pbcopy 

RC Logr 20200108 111937 - If you need to generate a … Rick Cogley

07 Jan 2020


I used the Simple Event Correlator «SEC» on a past project, and it is still maintained. It helps you monitor event logs using regex to detect fraud or attacks, by assigning meaning to patterns. Deep & interesting. 🔐

RC Logr 20200107 210557 - I used the Simple Event … Rick Cogley

02 Jan 2020

🗓 "New Year Holiday" in Japan


I use the CLI utility «jq» from stedolan a lot to manipulate json, and just bought a helpful Mac app called «jqTerm», from @rem Remy Sharp. 🤓🔥

It is similar to the existing jq playground, but has a pretty comprehensive set of built-in examples that are easy to load and play with, and lets you save your jq examples to the jqterm dot com site for sharing. Sweet!

RC Logr 20200102 161726 - I use the CLI utility «jq» … Rick Cogley

01 Jan 2020

🗓 "New Year Holiday" in Japan


Happy New Year, lovely nerds: may your 2020 be as crash free as possible. Heard of «Zeit»? Seems like an interesting service for static websites. 🤖

RC Logr 20200101 095245 - Happy New Year, lovely nerds: … Rick Cogley

31 Dec 2019

🗓 "Year End Holiday" in Japan


There are about 31,557,600 seconds in a year, with about 16,500 of those left in this year, in Japan anyway. May everyone have a peaceful and prosperous 2020! 🎍

RC Logr 20191231 191950 - There are about 31,557,600 … Rick Cogley