Skip to main content

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

micro.blog/sander

svandragt

mixcloud.com/cloudseer

 

I’ve switched all my personal experiments to Chassis this morning. I like the concept of plugins on a local dev setup. https://docs.chassis.io/en/latest/

 

Sometimes I do research for a browser tab and want to go back to the last used tab when I close the research topic. Other times I want to review all open tabs and cycle through them without switching back to the last used one every time. I'm ctrl-tabbing to make all tabs active but a separate keyboard shortcut would be great

 

WorkLog 2.2

WorkLog.py is a very simple script that allows you to keep track of what you are working on by writing a timestamped message to a CSV file.
It turns out it helps me stay on track during a long day of work.

Version 2.2 has some new quality of life improvements:

v2.2:

* ctrl-d or enter to quit.
* works on python2 default systems.
* f-strings,
* code more elegant.
* day based csv files.

https://gist.github.com/svandragt/080843c4ba632deaab6f3aea57ca9684

 

Fixing Virtualbox host network adapter cannot be created error

If when trying to start a vm, for example using vagrant, you get the error message that the host network adapter cannot be created:

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to create the host-only adapter
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage: error: Context: "RTEXITCODE handleCreate(HandlerArg*)" at line 94 of file VBoxManageHostonly.cpp

Make sure to first start the virtualbox GUI application. It does some extra checks, and sometimes highlights the permission problem:

In my case (OpenSuse 15.1 Leap), my user was not added to the vboxusers group. Via Yast > Users and Security .... and editing my user account it was a simple checkbox away. Remember to relog.

If that doesn't work, reloading the kernel extensions could help:

$ sudo dpkg-reconfigure virtualbox-dkms
$ sudo dpkg-reconfigure virtualbox
$ sudo modprobe vboxdrv
$ sudo modprobe vboxnetadp

 

What's up with keyboard shortcuts on macos? For many system shortcuts, there's an application shortcut that does something different.

 

I hope iPads will become more repairable for everyone in the future. This LCD issue ours developed can be repaired only by a full swap, for 75% of the cost of a brand new faster iPad! If the price is based on value of the product instead of its cost, then so should the repair price be.

 

I’ve wondered for years why and don’t supply an update service for applications to hook into to keep themselves updated. I guess it’s a lot more complex than building an updater.

 

So seems to have removed the Preferences > Sidebar > Additional Options > Show the Quick Switcher setting. Problem is I must have accidentally enabled this before it was removed and now I can't get rid of it?

 

ACF field groups with the same option position can be ordered by setting a key value. Key values starting with underscores are shown first. Field groups without keys are displayed inconsistently depending on the user role.

 

WordPress Canonical URLs for Category/PostName Permalinks

When the permalink format is set to %category%/%postname%/ then a post is available under category/postname links for all categories, as well as under all parent/child/postname links.

If you use Yoast SEO and have set a primary category, that  becomes the canonical URL that's used for SEO. If you don't then the postname for whatever category has a lower ID (was created first) becomes the canonical URL.

 

What is the meaning of a site's Last Updated property?

When running a WordPress multisite, in the site directory each site has a Last Updated property. I previously incorrectly assumed this reflected  when the site's metadata changed, for example the site's attributes. However, archiving and deactivating a site does not change the Last Updated value, so what does it do in WordPress 5.2.1?

As usual the best place to look is the WordPress codebase. It turns out that, on a multisite, this value is updated whenever a post is updated or deleted. It reflects the last content update, not the site's metadata.

By inspecting the html and looking up the property name, we find that the function that updates this is called wpmu_update_blogs_date and there is an action hook wpmu_blog_updated that receives the site_id variable. This function can be called whenever we want to update the value. It isn't used anywhere else.

If we're looking to update this date whenever the site's status changes, then via the same process it appears that he actions to hook into site attribute updates are in wp_maybe_transition_site_statuses_on_update so one could write a quick mu-plugin that updates the Last Updated property whenever these fire.

 

Where is the tin-foil-hat emoji?

 

I think I finally figured out how to use Apple News: subscribe to topics; unsubscribe from all publications. I use an RSS reader to follow sites.

 

The subjective safety of a place is expressed well by its reaction to people loitering.

 

Keyboard lag in SecondLife was caused by Popclip. Zapp!

 

Safari Web Content's high CPU usage was caused the Pocket extension.. Maybe downloading articles in the background? Zapp!

 

Fix for Google Chrome Bouncing Forever in the macOS Dock

I had the issue where it was not possible to launch Google Chrome. It would bounce in the dock forever without actually starting. Trashing the application and associated files (with Hazel) did not work.

Other people had the same problem:

The following instructions will help get Chrome back up and running.

The Fix

The solution to this issue is to remove all application settings. Start a terminal:

cd "/Users/`whoami`/Library/Application Support/Google"
mv Chrome Chrome.old
mkdir Chrome
open "/Users/`whoami`/Library/Application Support/Google"

Now start Chrome. If it starts correctly, trash the Chrome.old folder. 

Restoring the folder

If the fix did not work in your case, use the following commands to restore the original folder.

rm -rf Chrome
mv Chrome.old Chrome

Good luck!

 

Short form content promotes more of an emotional response, long form content a nuanced response. People should write more long form content, so I will try to blog more going forward.

 

Currently reading "Rapid Development" by Steve McConnell.

 

Password reset forms where paste is disabled. Trying to keep the hackers in ye?