Author: Steve
-
Update NordVPN Snap
When I get the error that NordVPN cannot update because I need to quit the application run these commands Run this to easily find the process id: You will get a response like:error: cannot refresh “nordvpn”: snap “nordvpn” has running apps (nordvpn), pids: 10116 Enter the process id into this command to stop NordVPN Then…
-
Block favicon.ico or make it inline html
To prevent favicon.ico requests and errors when not needed or reduce the number of server requests it is possible to inline an empty .png Based on comments here: https://stackoverflow.com/questions/1321878/how-to-prevent-favicon-ico-requests this creates an empty icon with correct mime typing.
-
Git, list all branches with their last commit date
Explanation: git for-each-ref: Iterates over refs (branches, tags, etc.).–sort=-committerdate: Sorts by the last commit date in descending order (newest first).–format=’%(committerdate:short) %(refname:short)’: Formats the output to show the commit date and branch name.refs/heads/: Limits the output to local branches.
-
Responsive headline word-wraps
It always happens that a long headline wraps 1 word to a new line, but if you add a line break, then it wraps one word before the line break at certain screen sizes. Here is a solution I came up with to handle that problem. The html: The css: Resize your browser to see…
-
How a 500 error and max_questions caught a sql injection attack
Due to limitations at the client’s host we had to troubleshoot a server outage through the Access Log and found that the site was under active attack
-
One-line bash script to create WordPress plugin zip from plugin directory
How I make a zip and ignore .idea, .git and other directories as defined in the .gitignore file This should not be done on a production site since a zip of the plugin will be publicly available and could expose sensitive information about your WordPress site. cd into the plugin’s directory This command will create…
-
Test a site backup locally
Download the site Download the site and unzip it into public_html Set up the docker-compose.yml Download docker-compose.yml and adjust as needed or use the version below: docker-compose.yml Import the database Change the path to the sql file in the docker container Create a backup of the database This will generate a backup of the database
-
Node version switcher using NVM
Node Version Manager makes it easy to switch which version of Node you are running: https://github.com/nvm-sh/nvm Install a version of Node: Switch to an already installed version: Check which versions are installed:
-
WordPress Gutenberg block not showing up sometimes
@wordpress/scripts 28 requires WordPress 6.6 or higher as explained in this thread: https://github.com/WordPress/gutenberg/issues/62202 so if you are using the currently latest WP 6.5 the easiest way to fix it is to install v27 of the scripts.