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โ€ฝ

20 Mar 2019


I posted about how to remove a key from ~/.ssh/known_hosts using vim, when you have StrictHostKeyChecking yes set in your ssh options and you get the WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED error. Other options: you can do it with sed -i '83d' $HOME/.ssh/known_hosts or more directly with ssh-keygen -R tried.host.com, replacing the hostname with the one that is failing. ๐Ÿค–

RC Logr 20190320 083743 - I posted about how to remove a โ€ฆ Rick Cogley

19 Mar 2019


Today I learned about Input Club mechanical keyboards, and the KLL keyboard input language. Looks like another brand of keyboard that has good quality with a good configurator. We are spoiled for choice! โŒจ๏ธŽ๐Ÿ”ฃ

RC Logr 20190319 124917 - Today I learned about Input โ€ฆ Rick Cogley

18 Mar 2019


Sys admins you will have seen those messages you get from ssh servers sometimes, saying IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY, and saying the fingerprint for a key is incorrect and cannot be verified. It is easy to fix with a vim one-liner. ๐Ÿค“

The error looks like:

Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
Please contact your system administrator.
Add correct host key in /path/to/.ssh/known_hosts to get rid of this message.
Offending RSA key in /path/to/.ssh/known_hosts:83
RSA host key for [ip]:port has changed and you have requested strict checking.
Host key verification failed.

Fix it like this:

vim $HOME/.ssh/known_hosts +"83d|x"

You can have a look at the manual, but the +"??" bit is a plus command, which tells vim to execute “Ex commands” separated by the pipe.

Simply put, it is just a kind of macro that acts on the specified file to press colon, followed by a vim command. In this case, in vim’s “command” mode (enter a colon to switch to it), it is doing :83d deleting the 83rd line in the file, then :x which exits. Note that, because you are running the d in normal mode, the file is saved and you just need x. This is easier to figure out than sed.

RC Logr 20190318 195558 - Sys admins you will have seen โ€ฆ Rick Cogley


Is your Japan branch using Era Year Names (ๅ…ƒๅท, ใ’ใ‚“ใ”ใ†, gengou) in any apps? If so, you should look into whether a patch or upgrade is needed, for the upcoming name change in May, from Heisei to something new. My firm eSolia can help, so please do not hesitate to ask us. ๐Ÿ‡ฏ๐Ÿ‡ต

RC Logr 20190318 103738 - Is your Japan branch using Era โ€ฆ Rick Cogley


The chips that power our devices rely on EUV or ยซextreme ultraviolet lithographyยป, to draw circuit lines e.g. less than 7 nm in width in the case of the Apple A12 Bionic chip. That is, less than 7 billionths of a meter. The Japan Times introduces Lasertec, the Yokohama firm that makes the equipment to test the needed chip stencils.

And all most of us are doing on our devices is clicking Like and Share! ๐Ÿคช

RC Logr 20190318 082725 - The chips that power our โ€ฆ Rick Cogley

17 Mar 2019


Happy St. Patrick’s day! Designers should note the official green and orange of the Irish flag are Pantone PMS 347: Hex #009a49 | RGB 0,154,73 | CMYK 100,0,53,40, and Pantone Orange PMS 151: Hex #ff7900 | RGB 255,121,0 | CMYK 0,53,100,0 respectively.

While you drink your green beer, did you know that the color associated with St. Patrick is blue? There are several associated shades including the one used behind the golden harp on the presidential flag: #23297a.

Beannachtaรญ na Fรฉile Pรกdraig ort!

RC Logr 20190317 101817 - Happy St. Patrick’s day! โ€ฆ Rick Cogley

16 Mar 2019


Heard about the #HHKBChallenge in the Bay Area by @taromatsumura? I have used PFU Happy Hacking HHKB keyboards for years, one at work and one at home. I love the form factor because desk space is at a premium here in Japan, the fact that they are not so heavy so you can schlep them on the train without too much trouble, and for the perfect-feeling Topre switches. You can buy a programmable controller to replace the original Topre one, from Hasu.

I’m using Japanese versions of the HHKB to get arrow keys in US English layout, with keycaps swapped to English, and the Hasu controller. A good fit! โŒจ๏ธŽ๐Ÿ’™

In addition: note that the switches are Topre, so keycap availability is limited, unlike with Cherry MX type switches. They are not compatible, so you need to get keycaps from PFU or Topre. I wanted some color when I got my HHKBs, so I got a spare set of yellow Topre key caps in Akihabara, and a kit with just 4 keys in it from PFU - blue and red escape and ctrl keys. When I got the idea to switch to the US English layout, I got the English keycap set from PFU and swapped it in. Also, at first I tried the black on grey color scheme, but that was way hard for me to use. I guess I need the legends.

RC Logr 20190316 091856 - Heard about the #HHKBChallenge โ€ฆ Rick Cogley


Haha, is it wrong to get this giddy over software? ยซMonodrawยป is an ascii art editor for macOS by @milend, which is just so slick. Love it! ๐Ÿค–

โ•‘              "VAGINA" AND "VULVA"?               โ•‘         
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                    
โ”‚Do you have orโ”‚       โ”‚Did they ask forโ”‚                    
โ”‚ did you ever โ”‚โ”€โ”€Yesโ”€โ”€โ”‚  your learned  โ”‚โ”€โ”€โ”€Yesโ”€โ”€โ”€โ”€โ”€โ”        
โ”‚have a vagina?โ”‚       โ”‚    opinion?    โ”‚           โ”‚        
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚                       โ”‚          โ”‚Do you actually โ”‚
        โ”‚                       โ”‚     โ”Œโ”€โ”€โ”€โ”€โ”‚    know the    โ”‚
        โ””โ”€โ”€โ”€โ”€Noโ”€โ”€โ”€โ”€โ”       โ”Œโ”€Noโ”€โ”˜     โ”‚    โ”‚  difference?   โ”‚
                   โ”‚       โ”‚          โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                   โ”‚       โ”‚          โ”‚             โ”‚        
                   โ”‚       โ”‚         No            Yes       
                   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚             โ”‚        
                   โ”‚โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ”‚   โ”‚     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                   โ”‚โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ”‚   โ”‚     โ”‚โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ”‚
                   โ”‚โ–ˆShut up now.โ–ˆโ”‚โ”€โ”€โ”€โ”˜     โ”‚โ–ˆโ–ˆProceed but โ–ˆโ”‚
                   โ”‚โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ”‚         โ”‚โ–ˆkeep it briefโ–ˆโ”‚
                   โ”‚โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ”‚         โ”‚โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ”‚
                   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

RC Logr 20190316 000357 - Haha, is it wrong to get this โ€ฆ Rick Cogley

15 Mar 2019


Learn what ยซCAPTologyยป is so you can gird yourself against it (I do not care about likes, I do not care about likes). โš”๏ธ

RC Logr 20190315 164306 - Learn what ยซCAPTologyยป is so โ€ฆ Rick Cogley


If you tried using bc to do the quick pi calculation I mentioned yesterday, you can also use an internal value SECONDS to calculate elapsed seconds. The SECONDS only tracks whole numbers, so the time calculation is rather rough, but it works in a pinch.

This works in zsh or bash: SECONDS=0 ; echo "scale=3000; 4*a(1)" | bc -l ; echo $SECONDS ๐Ÿค“

This also works, using simple math to do date arithmetic (the $(()) triggers the math):

STARTT=$(date +%s) ; echo "scale=2000; 4*a(1)" | bc -l ; ENDT=$(date +%s) ; echo "Took $(($ENDT - $STARTT)) seconds to calculate this..."

Or in zsh, this gives output like 1.92s user 0.02s system 99% cpu 1.954 total:

{ time ( echo "scale=2000; 4*a(1)" | bc -l ; ) } 2>&1 

In bash, just replace the () around the command you are timing with {}. Calculating pi using this 4*atan(1) formula is super slow, so anything more than a couple thousand digits will take tiiimeeee.

RC Logr 20190315 082448 - If you tried using bc to do โ€ฆ Rick Cogley

14 Mar 2019


Since it is March 14th and Pi day, here is an odd fact: you cannot ever know the exact circumference or area of a circle, due to the nature of Pi. I understand that even space shot calculations do not use all that many digits anyway, so if that is good enough for NASA, I won’t worry about it.

Congratulations to Emma Haruka Iwao and her team at Google for recently breaking the record of the most accurate value of pi, calculated out to 31,415,926,535,897 digits using a program called y-cruncher on 25 virtual cloud servers over four months, and using up 170 TB of data. Wow! ใŠ—๏ธ๐ŸŽ‰

RC Logr 20190314 180352 - Since it is March 14th and Pi โ€ฆ Rick Cogley


Happy ฯ€ day. #piday #ๅ††ๅ‘จ็Ž‡ใฎๆ—ฅ It is trivial to approximate pi to say 100 digits using bc, the command line calculator. echo "scale=100; 4*a(1)" | bc -l will do it. Try scales of 1000 or 10000 as well. The former should be reasonable, and the latter will take quite a while. ๐Ÿ”˜

RC Logr 20190314 170409 - Happy ฯ€ day. #piday #ๅ††ๅ‘จ็Ž‡ใฎๆ—ฅ It โ€ฆ Rick Cogley


And last not least, check out ยซTubesยป by Andrew Blum, a ยซJourney to the Center of the Internetยป. Well, it is about the tubes that connect us. ๐Ÿ“š

RC Logr 20190314 133358 - And last not least, check out โ€ฆ Rick Cogley


NEC subsidiary OCC is a major maker of undersea cables, and some models of their SC300 and SC500 steel-reinforced fiber cables are able to be deployed at depths greater than 9000m. Check out the brochure from NEC for a good overview of the whole system they provide for these interesting and challenging projects. โ›ด

RC Logr 20190314 125911 - NEC subsidiary OCC is a major โ€ฆ Rick Cogley


Most of the massive amount of our internet traffic including Netflix binges, is carried by underseas cables. Ever since the first one was pulled across the English channel in 1851, humans have laid a huge amount of cable under the sea. It is an interesting topic, from the cable design by companies like NEC OCC, to the actual method of delivery. ๐Ÿšข

RC Logr 20190314 085618 - Most of the massive amount of โ€ฆ Rick Cogley

13 Mar 2019


Thinking about the potential perils of using remote access technology in inappropriate situations, I was reminded of this ยซOld Eigyoยป advert I saw in a taxi. The pasty-faced new kid is being introduced, and the veteran sales reps react with shock-horror at his skinny legs, saying that sales is all about your leg muscles! The narrator says ยซno longer, you can just use our product to do sales from your desk.ยป Ugh, put me down for old eigyo anytime. Technologists should remember that remote access and remote presentation is not always the best way. Thanks @norombasic for the reminder. ๐Ÿคจ

RC Logr 20190313 084110 - Thinking about the potential โ€ฆ Rick Cogley

12 Mar 2019


Twitter user @hmpffff gave me a tip about ยซdavmailยป, the main goal of which is to ยซprovide standard compliant protocols in front of proprietary Exchangeยป. It is a bridge between standards-compliant software that uses IMAP, CalDav, CardDav etc, and Exchange. Looks like a cool tool! ๐Ÿ˜Ž

RC Logr 20190312 225720 - Twitter user @hmpffff gave me โ€ฆ Rick Cogley


F5 Networks has agreed to acquire Nginx for 670MM USD. It remains to be seen if this will impact their open source offering, but there is always Apache, Caddy, Lighttpd, and others written in Rust etc. Hopefully this will be the catalyst to push a move from HTTP/0.9 finally. ๐Ÿ’ฐ

RC Logr 20190312 133400 - F5 Networks has agreed to โ€ฆ Rick Cogley


Living in Japan with our pervasive, sleepy feeling of security, we do not consider that our PIN numbers at an ATM might be skimmed. I heard skimming does happen in Japan, but this ยซKrebs on Securityยป article shows how creative criminals can get. ATMs are not drive-through here so the logistics are different, but my takeaway is that I think I will start covering the pad with something as I enter the PIN. ใŠ™๏ธ

RC Logr 20190312 091026 - Living in Japan with our โ€ฆ Rick Cogley


Learned about ยซKeyMeยป in the New York Times this AM. Apparently they are developing what they call ยซproactive relationships with law enforcementยป. Frankly, the whole concept of a 3rd party kiosk where you can get a card key copied, sounds super dicey to me. So many unanswered questions and so much blind trust. ๐Ÿ‘

RC Logr 20190312 072547 - Learned about ยซKeyMeยป in the โ€ฆ Rick Cogley