Skip to main content
 

Going to have to investigate whether to improve Known or switch to another blogging system. How is WordPress when posting from mobile these days?

 

Faster rendering through a Local DNS Proxy

Unless you're using DNS over HTTP (DoH), you can speed up general DNS requests by running a local DNS proxy, and increase the expiry time of DNS queries. I'll go into this further once I've updated this post for DNSMASQ to do DoH.

The following configuration will speed up browsing in Safari for example.

Install DNSMASQ:

brew install dnsmasq

Load all configs from /etc/local/etc/dnsmasq.d/:

echo "conf-dir=/usr/local/etc/dnsmasq.d,*.conf" | sudo tee —append /usr/local/etc/dnsmasq.conf
mkdir -p /usr/local/etc/dnsmasq.d


Edit /usr/local/etc/dnsmasq.d/proxy.conf:

# Tell dnsmasq to get its DNS servers from this config file only.
no-resolv
# Add router dns
server=192.168.1.1

# cache for 1h
min-cache-ttl = 3600

Start DNSMASQ on boot and launch it:

sudo brew services start dnsmasq

Test:

dig cnn.com @127.0.0.1

Query time should be 0 the second time and an ANSWER SECTION should be returned. If that is the case open System Preferences > Network > Advanced > DNS > +

Enter: 127.0.0.1 and hit OK > Apply.

 

I start a zsh instance and I get interrupted by oh my zsh asking to update.

 

I ask homebrew to install a package and it starts updating formulas.

 

I initiate a new Github Pull Request on a forked repo and it default destination is upstream/master

 

I type a word and another word shows on the screen.

 

The amount of attention breaking distractions encountered using modern devices is frankly baffling and user hostile. From selecting a show on a streaming service and instead seeing a preview of a different one to the weird autocorrects on modern iPhones. When you initiate an action the computer is not meant to surprise you!

 

if I want to update homebrew I would have updated homebrew. Just update it in the background.

 

SecondLife is reinvesting in events

Improvements to the Events pages are in the works for 2020, too. You’ll soon see more functionality and a new look, such as the ability to set an alert on an event you want to attend, to follow your favorite event hosts, to share your event calendar with friends, and to see the latest event developments in a news feed. 

https://community.secondlife.com/blogs/entry/3016-the-return-of-last-names-and-changes-to-marketplac...

 

Making Recents more useful

Clean Recents list

So if you open Recents in the sidebar it's likely it's full of files you have no idea you recently opened. It's most likely that you didn't. We can make Recents more useful by restricting the last opened date, and make using it more convenient. This is how:

  1. Open Finder, then Recents in the sidebar.
  2. From the cog menu, select Show Search Criteria, add a criteria via the plus button.
  3. Change the filter name to Last Opened Date within last 14 days and press Save.
  4. Name it My Recents, and enable Add to sidebar.
  5. From the sidebar, drag the smart search into the dock next to the Trash.
  6. Optionally remove the recents icon from the sidebar. You can restore the item via Finder > Preferencers > Sidebar by dragging it back in.

As a bonus tip, update  the icon for the smart search (just like any other folder and app) as follows:

  1. Open /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ and search for "Recents" to find the current Recents icon, or choose an alternative.

  2. Right click on the My Recents icon in the sidebar and choose Get Info.

  3. Drag the preferred icon from the folder into the icon slot in the top left of the Get Info window.

This changes the icon in the window title, but I haven't found out how to change it in the sidebar.

 

What is up with macOS font rendering?

What is up with macOS font rendering?

The text in news is a lot blurrier than the text in messages.

 

Turns out for webdev you don't need full Xcode, trash it and install the stanalone developer tools via `xcode-select --install`. Just as well as the App Store has been redownloading Xcode all day yesterday.

 

2019 and I still love to add `fortune` to my shell profile.

 

If you or your company have a contact form on a website, please send a test email today to confirm that someone reads them! Many times I hear nothing back, particular from small business.

 

"remote working is..."

 

It's all gone pythong.

 

Working with Two SSH keys

If you're working with two SSH keys (work / personal) then the following setup is quite elegant. It assumes all repositories are work related, unless they're hosted under your own user:

Host *
 AddKeysToAgent yes
 UseKeychain yes
 StrictHostKeyChecking no
 User git
 IdentityFile ~/.ssh/id_rsa_corporate

# personal account
Host github.com-MYUSERNAME
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa

 

Howto setup Python in Pop!_OS 19.10 or Ubuntu

A new OS, another two hours wasted. Pop!_OS 19.10 comes with Python3.7rc5, which is nice but my project requires 3.6 just now. As you know we've gone through this before, but this time we can setup multiple python version support.

Let's setup pyenv, pip, pipenv and then install another python version.

# Setup pip.
curl
https://bootstrap.pypa.io/get-pip.py | python

# Pip can setup pipenv.
pip install pipenv --user

# Manage multiple python versions through pyenv.
# @see https://github.com/pyenv/pyenv/wiki/Common-build-problems

sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
curl https://pyenv.run | bash

Follow the instructions to add pyenv to the path. Now we can do stuff like:

# install another python version.
pyenv install 3.6.9

# OR let pipenv do it.
cd ~/dev/myproject
pipenv install --dev

Leave a comment if you have any issues, as this was written retrospectively.

 

Coffee Is Hard | Hacker News

Sometimes the comments are as meaningful as the article that inspired them. 

 

Web developers, consider how visitors may want to share your page with others, so don’t cover up items on your handy shopping list page with a Consent Prompt when saved as a PDF.