Rick Cogley's Tech Logr

Short Technical Laser Bursts %%

Welcome

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

11 May 2019

«08:11:14»

Ars says Nest died at Google I/O 2019. The current unbridled investment culture where product ecosystems are bought then destroyed, should make you nervous. 😬 Any great or disruptive product or service is an acquisition target, because what business owner can resist quick riches. It assumes our acceptance and trust of the massive companies doing the acquiring. Do you really trust them?

RC Logr 20190511 081114 - Ars says Nest died at Google … Rick Cogley

09 May 2019

«07:50:11»

Reading this article from EasyDNS about Network Solutions scammy business practices, I am reminded that I moved our domains and my client domains off Network Solutions for just these reasons. I have not regretted the decision. Better to avoid anything netsol. 😖

RC Logr 20190509 075011 - Reading this article from … Rick Cogley

08 May 2019

«08:15:22»

Todd Austin and colleagues at The U of Michigan, have developed the unhackable chip «MORPHEUS», which randomly shuffles bits of its own code, defeating hackers by changing even while they try to exploit it. They say it is akin to a Rubiks Cube that changes itself every time you blink. 🤖

RC Logr 20190508 081521 - Todd Austin and colleagues at … Rick Cogley

07 May 2019

«18:21:33»

Microsoft is shipping a Linux kernel in «Windows Subsystem for Linux WSL 2». That is pretty astounding news. It means faster startup for the system, faster file io operations like git clone or npm install and even use of Docker. ㊗️

RC Logr 20190507 182133 - Microsoft is shipping a Linux … Rick Cogley

«17:56:01»

We are back at work after a long, long Golden Week. Well that will not happen for another 30 years! Learned about an interesting device today, the Sensel Morph. Nifty! 🎼

RC Logr 20190507 175601 - We are back at work after a … Rick Cogley

05 May 2019

🗓 "Children's Day" in Japan

«06:36:48»

PSA: A hacker is wiping git repositories and demanding bitcoin ransom. Git config files were scanned for credentials, then used to access and alter git commit headers. If this happened to you, ask your friendly git provider’s support team for help.

If it hasn’t, change your password to a stronger one, enable 2FA of course, and KonMari any unused API tokens. See? That should have sparked some joy for ya. 👻

RC Logr 20190505 063647 - PSA: A hacker is wiping git … Rick Cogley

03 May 2019

🗓 "Constitution Day" in Japan

«12:10:35»

Welcome to May, the beginning of the Reiwa 令和 Era in Japan. The color palette on my Logr site this month was picked thinking of the off white of the Deutzia, or «U-no-hana 卯の花», a type of hydrangea, as well as the beautiful greens of late spring. It has rained most of our specially long golden week, but we have had a couple days of sun. 💐

Not to forget the technical aspect, I am using Hugo Pipes to automatically generate the css from sass code with color variables that define the color palette for the month.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
...
{{ else if eq $mnth "April" }}
$textHilite: #63fbef !default;
$textHilite: $yellow !default;
$codeBgColor: #fee9eb !default;
$one: #FB636F !default;
$two: #A9D14A !default;
$three: #f60619 !default;
$four: #230104 !default;
$topbannerimage: "Cogley-Banner-Hiratsuka-Beach-Windsurfers.jpg";

{{ else if eq $mnth "May" }}
$textHilite: #25ee05 !default;
$codeBgColor: #f8fbf7 !default;
$one: #629A59 !default;
$two: #91599a !default;
$three: #54ad46 !default;
$four: #131e11 !default;
$topbannerimage: "Cogley-Banner-LIFE-Noble-Note.jpg";
...

RC Logr 20190503 121035 - Welcome to May, the beginning … Rick Cogley

«11:51:58»

Martin Tournoij reformatted «The Art of Unix Programming» by Eric S. Raymond. See his easy-to-read, searchable, single-page version of this oldie-but-goodie from 2003 right here. Thanks! 🙏🏻🎉

RC Logr 20190503 115158 - Martin Tournoij reformatted … Rick Cogley

30 Apr 2019

🗓 "Special Holiday for Emperor's Abdication" in Japan

«09:49:40»

One mistake I often see beginning front-end devs make is, not knowing the difference between an absolute path (/img/logo.png) and a relative path (img/logo.png). It will serve you well to know this. 👍

Terminal usage has similar characteristics, with cd /bin and cd bin changing to the bin off the root of the file system and the bin in the current folder, respectively.

RC Logr 20190430 094940 - One mistake I often see … Rick Cogley

25 Apr 2019

«09:56:40»

Learned about «Synergy» from Symless today, which lets you share one mouse and keyboard with multiple computers, letting you move between them seamlessly. Going to try it out between my main Mac, and my Linux desktop. 🔁

RC Logr 20190425 095640 - Learned about «Synergy» from … Rick Cogley

21 Apr 2019

«09:58:01»

Learned about «Working Copy» today, a git client for iOS. Anyone use it? I think it would be cool to combine this with a CI system so that a commit and push would trigger a build and publish. 🤖

RC Logr 20190421 095801 - Learned about «Working Copy» … Rick Cogley

18 Apr 2019

«12:29:25»

You can use a plugin to generate your vim status line, or you could use the «vim statusline generator» from Tom Daly, and just chuck the results into your .vimrc. Cool! 😎

RC Logr 20190418 122925 - You can use a plugin to … Rick Cogley

14 Apr 2019

«13:51:42»

Given a json file, used say for a search index, you can easily use «jq» from stedolan to extract what you need from it. 👻 It is as simple as piping the json to jq, and using its powerful filtering to extract what you need. I generate the search index for this site in json, because that is what lunr requires, but it doubles as a source for the info I use to tweet about a new post.

Given a json like this:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
[
  {
    "content": "Static site generator «Hugo 0.55.1» was released, with three bug fixes. Go static! 🚀 #gohugo #jamstack #golang #webdev\n",
    "ref": "https://logr.cogley.info/2019/04/12/1555079759/",
    "tags": null,
    "title": "RC Logr 20190412 233559"
  },
  {
    "content": "MacOS or Linux users, you might find log file viewer «lnav» useful. It is for viewing local log files, and requires no server like Splunk. Fire it up, press ? to toggle help or / to search. 🕵🏻‍\n",
    "ref": "https://logr.cogley.info/2019/04/12/1555047850/",
    "tags": null,
    "title": "RC Logr 20190412 144410"
  },
  {
    "content": "The first black hole...

… I use something like this to extract what I want to tweet:

1
cat index.json | jq --raw-output '.[0] | .content[:75]+"... "+.ref' 

That pipes the index json file to jq, gets the 0th (first and latest) node, then pipes it extracting and concatenating the values of the .content and .ref keys, limiting the .content value to 75 characters. With jq, concatenation to string literals is done with a plus sign. The statement within the single quotes is where the work is done, and it can be multiple filters with pipes between.

RC Logr 20190414 135141 - Given a json file, used say … Rick Cogley

13 Apr 2019

«12:16:27»

Apple iCloud Drive has its place and works well for syncing data for certain apps to «all teh devices», but it really causes trouble sometimes. It especially did not play well with some secure .sparseimage files I had stored in $HOME/Documents on my Mac. 😳

To wit, I was sometimes getting unwanted copies of my secure disk images, and other files under $HOME/iCloud Drive (Archive) or $HOME/Documents - rickmac. To fix I created $HOME/docs, outside the paths iCloud drive targets for syncing, and migrated the files there. Anything that is not needed on my mobile devices is getting chucked in this new folder.

Sync is hard and here are a few commands to aid macOS users in no order:

1
2
3
4
5
~ > killall -KILL bird #bird is the sync daemon
~ > killall -KILL Finder
~ > brctl log -w #watch bird log, ctrl-c to exit
~ > rm -rf ~/Library/Application\ Support/CloudDocs
~ > rm -rf ~/Library/Caches/com.apple.bird

You may need to stop and restart iCloud Drive, or restart the computer.

RC Logr 20190413 121627 - Apple iCloud Drive has its … Rick Cogley

12 Apr 2019

«23:35:59»

Static site generator «Hugo 0.55.1» was released, with three bug fixes. Go static! 🚀 #gohugo #jamstack #golang #webdev

RC Logr 20190412 233559 - Static site generator «Hugo … Rick Cogley

«14:44:10»

MacOS or Linux users, you might find log file viewer «lnav» useful. It is for viewing local log files, and requires no server like Splunk. Fire it up, press ? to toggle help or / to search. 🕵🏻‍

RC Logr 20190412 144410 - MacOS or Linux users, you … Rick Cogley

11 Apr 2019

«07:19:28»

The first black hole “photo” is incredible, and before her credit gets sucked into said black hole, it was Dr. Katie Bouman came up with the clever computer algorithm to capture it. She explains how, from the TED stage. (Say it in @GuyRaz’s voice) What an inspiration to young women considering a career in STEM! 👭

A couple of technical tidbits:

  • the black hole is so far away, 53 million light years, that it required use of the planet-sized EHT or Event Horizon Telescope. The EHT is 8 observatories across the globe, using interferometry to combine the data.
  • there was petabytes worth of data, and it had to be ferried around via essentially “sneakernet”, since some of the locations don’t have good Internet connections and there was simply too much data to send via wire.
  • Dr. Bouman herself has said it was a team effort, and indeed it was a team of 200 astronomers world wide.
  • Scientists on the team estimate the mass to be 6.5 billion times as massive as our sun.

Read about it here from MIT news office.

RC Logr 20190411 071927 - The first black hole … Rick Cogley

10 Apr 2019

«09:30:15»

Saw @AdobeType post that they are adding the #Reiwa era single-kanji character to their Japanese type faces such as Source Han Sans. This is the single-kanji version of the era name, like the Unicode ㍻ U+337B «square era name heisei». 🇯🇵

RC Logr 20190410 093015 - Saw @AdobeType post that they … Rick Cogley

«07:51:01»

Turns out birds are not so bird-brained after all, per the «Birdsong» episode of the fantastic 20000 Hz podcast @20korg (20K Hz is the typical upper limit of human hearing). Birds have a pharynx like humans, but sing with their syrinx, an organ at the base of the trachea. 🐦🐧

Some awesome examples from the episode:

  • the New Zealand kokako can produce organ-like chords
  • the African Grey Parrot can mimic human speech
  • Mockingbirds can mimic other birds and even frogs
  • the Australian Lyre bird and its uber-complex syrinx can mimic whatever it hears!

It’s worth a listen, and birds are cooler than you might imagine!

RC Logr 20190410 075101 - Turns out birds are not so … Rick Cogley

09 Apr 2019

«22:45:21»

PSA: A serious bug was discovered in Apache, the web server that powers a lot of the internet. Vulnerability CVE-2019-0211 allows scripts to be executed with root privileges, allowing system takeover especially on shared hosting environments. 🐞☠️

Apache foundation released patched version 2.4.39, so confirm and update (or request an update):

1
2
3
4
5
6
7
8
~ > httpd -v  # or apache2 on some
Server version: Apache/2.4.34 (Unix)
Server built: Feb 22 2019 19:30:04
~ > curl --head https://thesite.com
HTTP/1.1 200 OK
Date: ...
Server: Apache/2.4.34
...

You might need to confirm from your “control panel” in a shared environment. Note that Apache sysadmins can make settings to block these tools from getting any details about the web server. Same caveat applies, but you can also put <?php phpinfo() ?> in a file like info.php, then serve and access it.

RC Logr 20190409 224521 - PSA: A serious bug was … Rick Cogley