This post shows how to modify the name of the uploaded file while WordPress processes the upload. Renaming may be helpful if you need to implement cache-busting or, say, change the file’s name so that it matches the slug of the parent post.
How to Implement Revisions for Non-Standard Custom Post Types in WordPress
Post revisions do not work out of the box for custom post types which do not support the “title” and “editor” features. This post provides the necessary steps and code samples to make post revisions work for such post types.
How to Automatically Unsubscribe from GitHub Repositories
In this post, we implement a simple script in Node.js, which unsubscribes you from notifications from unwanted repositories in GitHub.
Ryte Indexability Check and Cloudflare’s Bot Fight Mode
Ryte indexability check and Cloudflare’s Bot Fight Mode are not compatible. You have to disable either the Bot fight mode or Ryte integration.
How to Improve Performance of Sitemap Generation in WordPress
This article provides a simple trick to reduce the load on the server when generating a sitemap. We do this by disabling all widget-related code if the current request targets the sitemap or its stylesheet. The trick is compatible with many existing plugins.
How to Make Lando Work with Ubuntu 20.04
Lando is a local development environment and DevOps tool built on Docker container technology, aimed at providing an easy way for developers to specify requirements for their projects. It provides installation packages for various operating systems, including Ubuntu. However, if you are not using the official Docker distribution, Lando will likely fail to install.
In this article, we describe two workarounds on how to install Lando on Ubuntu.
Multi-stage Docker Builds and Extended File Attributes
Multi-stage builds are a great way to keep the size of the resulting image down. They are extremely useful if you want to use scratch-based images for your application. However, unless you are using Buildx or BuildKit, there is a limitation regarding copying extended file attributes across stages. In this post, we discuss several workarounds to this issue.
ConfigServer’s Login Failure Daemon is Vulnerable to Denial of Service Attacks
Login Failure Daemon (lfd) is a process that monitors the authentication log and matches all its lines against the set of regular expressions to detect login attempts that continually fail within a short period of time. It is often used to detect login failures of SSH connections. However, the regular expressions lfd uses to detect brute force attacks contain severe errors, and an attacker can exploit those bugs to cause a denial of service attack.
Quote of the Day
I’m only aware of using lodash when it has yet another security vulnerability
How to Delete Old ReplicaSets in Kubernetes
To delete all old ReplicaSets in Kubernetes, you can use the following one-liner:
kubectl get rs -A -o wide | tail -n +2 | awk '{if ($3 + $4 + $5 == 0) print "kubectl delete rs -n "$1, $2 }' | sh