If you have a WordPress site that allows comments without registering, your trash will likely be filled with hundreds of spam comments that you will need to deal with. Here are a few relatively simple steps to help almost completely eliminate this problem.Continue reading “How to automatically block WordPress bot spam without a plugin”
The Gaggia Classic is a very capable espresso machine that gets even better with a couple of improvements. Once the machine has been set to 9 bars of pressure (see bottom of article), the next big improvement is the addition of a PID. This gives the machine a whole new level of consistency, and gives you fine control over brew temperature. Here’s how to install a PID on the Gaggia Classic Pro.Continue reading “Adding a DIY PID to the Gaggia Classic Pro”
How to convert CUSIP-6, CUSIP-8 and CUSIP-9 to ISIN with PHP
When working with securities data, you often have to convert between security identifier schemes. Sometimes you get ISINs, other times you get CUSIPs (and other times, CIKs, but that’s another story). The result is that you need to be able to convert between these schemes. There are pseudo-code algorithms for converting a CUSIP-9 to an ISIN, but I couldn’t find any in PHP, and I also wanted to be able to convert a CUSIP-6 or CUSIP-8 to an ISIN.Continue reading “Converting CUSIP-6, CUSIP-8 and CUSIP-9 to ISIN in PHP”
Your browser, as well as Boostrap, comes with built-in form validation, but when it comes to checkboxes, the validation options are limited. I created a form with three checkboxes, and the user is required to check at least one. Bootstrap only performs ‘required’ validation on checkboxes, which, in this case, won’t work, because only one – and any one – of the checkboxes is actually required. Here’s how to address this:Continue reading “Custom checkbox form validation with (or without) Bootstrap”
I have been receiving more and more spam through the contact form of one of my sites, which uses Contact Form 7. To help stop this, I created a simple custom function that blocks contact form messages that contain specific words, without any additional plugins or services.
There are several ways to deal with spam sent through Contact Form 7, but many involve yet another plugin, paid services, annoying captchas, math quizzes, etc. If you just want to stop contact form messages that contain specific words, you can add a filter in your site’s functions.php file.Continue reading “Custom spam filter with Contact Form 7, no extra plugins needed”
Command line tools generally produce some kind of output on the screen. This output is actually two (or more) streams, and these streams can be handled independently.
Until recently, I was using my Ubiquiti EdgeRouter in bridge mode. I had my LAN on one ethernet port, and my wireless access point was connected to another ethernet port. Then I configured a bridge between the LAN and wireless AP ports. Logically, this made sense. However, this forces the EdgeRouter to do network switching duties, which it does entirely in software, and this is very SLOW. Even Ubiquiti states upfront that running in bridge mode will affect performance. Don’t use bridge mode.
After switching to Telus Optik, I wanted to take advantage of Telus IPv6 support, using my Ubiquiti Edgerouter Lite. After a lot of googling, I was able to put enough pieces together to get full IPv6 working across my network. This configuration will work with EdgeOS 1.9.0, and should work with versions of EdgeOS going back at least to 1.7.0.
I just upgraded this site’s Ubuntu OS from Trusty 14.04 to Xenial 16.04. There are a couple of pitfalls during the upgrade that are noteworthy.
The biggest issue when upgrading to Xenial: Nginx and PHP5-FPM will break when you upgrade. So, keep in mind that any of your sites that rely on PHP5-FPM will be down during the Xenial upgrade.
Continue reading “How to upgrade Ubuntu, NGINX and PHP5 FPM from 14.04 Trusty to 16.04 Xenial”
I have written about renewing certificates from Let’s Encrypt in the past, and to the project developers’ credit, they keep making the process of getting, installing and renewing certificates easier. There’s a new client called certbot (and certbot-auto) that can be used to almost completely automate the certificate process. As an added bonus, the certbot client’s
--webroot method allows you to renew without having to stop your web server and restart, and you no longer need to pause services like Cloudflare.
Continue reading “Renewing a let’s encrypt certificate made even simpler: automatically”