Skip to main content

Senior Web Engineer. Open web / music. Remote DJ. Tall Dutch guy. #3million

micro.blog/sander

svandragt

mixcloud.com/cloudseer

 

Still thinking about how to solve the “posting a digest of interesting links today” problem.. In the meantime I'll post them on my website, not showing on the homepage but under https://vandragt.com/content/bookmarkedpages/

 

Opinion pieces used to be more insightful than the news. Now they’re just more ridiculous. Research the subject instead, you will be better informed than the people writing these articles.

 

Countdown - a bash countdown timer

I was looking for a tea timer countdown but quickly realised I might as well use a countdown script for this. I based my script on the linked script but added a customizable notification at the end

$ nano ~/bin/countdown
#!/bin/bash
# v2 - 2019-05-01
secs=$1
msg=${2:-$1 seconds passed.}
while [ $secs -gt 0 ]; do
echo -ne "$secs\033[0K\r"
sleep 1
: $((secs--))
done
notify-send 'Countdown Finished' "$msg"

$ chmod +x ~/bin/countdown
$ countdown 180 "Tea is ready."

 

macOS doesn't use a swap file when running from an external SSD

So I was seeing graphical glitches, freezes and Activity Monitor indicated memory pressure. Turns out macOS doesn't mount a swap file, as I am running from an external SSD install.

This is easily fixed. I can't believe it is a problem though.

By the way I had to change the end of line 4 (because the command in the Ask Different answer returned multiple results) to:

VM_VOLUME=$(/usr/sbin/diskutil list | grep "VM" | awk 'NR==1{print $7;exit }')

It's easy to add the launch item using Lingon X and start it with sudo ./mountvm.sh for the current session.

 

DarwinMailApp gives us all a lesson in customer service in this thread: https://news.ycombinator.com/item?id=19705440 His tone is exactly right, and encourages more follow-ups as a result. Well done!

 

Stop OpenPGP passphrase prompting on login

As a security conscious person I setup my OpenPGP keys with a passphrase, however on OpenSUSE Leap 15 this causes a login prompt to appear that delays the network connection from initiating. The same issue also blocks software updates and means a browser restart due to DNS cache stopping connections to websites. This is fairly annoying.

It turns out that this can be fixed by sharing the network connection via Connections > open the connection > General Configuration > All users may connect to this network. This causes NetworkManager to cache the required  authorization tokens (this is my understanding).

Note that other software such as Kontact might set a daemon to startup by default, causing the same prompt. This can be unticked in its settings.

If everything else fails, then you could remove the passphrase for the PGP key but this is not recommended as this means someone can take on your identity should your key be exposed for any reason.

 

Without documentation the feature might as well not exist. I should get better at that.

 

Amazing opportunity for ddossing a website through malicious shared js libraries by setting ping attributes pointing to the ddos target across millions of websites. https://www.bleepingcomputer.com/news/software/major-browsers-to-prevent-disabling-of-click-tracking...

 

I'm migrating from Apple Notes to Evernote as the Apple Notes export is lacking and Evernote has a more open ecosystem. For this I created a migration AppleScript https://gist.github.com/svandragt/91637e7f11165ab5a0b327ab89c980fd

 

TIL (thanks Ali) the escape functions finish up by applying a filter to the safe output, making them unsafe again.

 

I've updated my notetaking tool reference with my current recommendation: Dropbox Paper https://vandragt.com/pages/notetaker-tools

 

Sublime Text is the best scratchpad editor: with it restoring unsaved tabs across sessions.

 

On doing good work

Aka why I keep having bad customer experiences.

Assuming the idea of a business (and us when we represent it) is to stay in business then it should aim to make the customer (a fellow person) happy as happy people are loyal.

This means the person needs to understand what the other person wants from the transaction to be happy. It also means both parties must understand the details of the transaction to know how this makes them happy. The product must be understood  to ensure maximum happiness.  And finally if the product or service offered is not making the customer happy then it’s the responsibility of a good business to help the customer find happiness another way. 

Doing good business is about understanding people, and having empathy. 

This is also why why car dealerships keep disappointing me. Stop pushing product. Start making people happy. 

 

When writing a script that invokes git stash, make sure the script is committed before running it, if it's in the same repository ;-)

 

It's wasteful to load all the site's css and javascript if the visitor only comes to visit one page.

 

Daily crossword puzzle but with the puzzle replaced with denying a consent dialogue.

 

I've just signed up for Zapier and Mailchimp to create a weekly email of an RSS feed containing any interesting articles I find. Hopefully that will both improve my Friday and stop the urge to share every interesting link.

 

Im trying to go paperless but logging into stuff to get my statements out Is as bad as getting paper. Any solutions?

 

The WordPress community is very excited about raising the minimum PHP version to one that's longer supported. ;-)

 

Writing a python script < reinstall pipenv < pyenv install new python < install Xcode commandline tools.