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):
1
2
3
4
5
6
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:
1
> ipconfig /flushdns
On Linux, it can be app by app or, on Ubuntu/Debian, you can do either of:
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:
1
2
3
4
npm install -g http-server
cd /path/to/my/working/folder
http-server --help
http-server
Visit http://localhost:8080 and look at the help to change the port.
Python 3 users can run:
1
python -m http.server 8080
Or with php:
1
php -S localhost:8080
Then if you use zsh put it in a function in your ~/.zshrc:
1
2
3
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. 👍
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:
1
$ go get github.com/mattn/twty
… and boom.
RC Logr 20200510 062445 - Twurl uses ruby and broke, so …Rick Cogley
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
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:
1
2
3
4
5
6
7
8
9
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:
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.
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
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
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
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
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
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
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
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
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