In my web development career, I have countless times needed to look at Apache logs to figure out or find out about problems with sites, monitor activity, or for various other purposes. I’ve used command line tools to help with this, often looking for strings and counting occurrences. Since I recently needed to create a command string to count unique IP’s connected to a given string in the logs, I thought I’d post about it and a few related useful commands.
Continue reading post "Looking at Apache logs with command line tools"WWW posts page 9
Custom logic for unattended upgrades reboot
The Ubuntu / Debian unattended-upgrades
package has an option to automatically reboot as needed when it upgrades packages. It will do this without user input, at a chosen time. However, it doesn’t allow for any conditions beyond need and time. I found a need for more nuance recently, so I had to disable the built-in functionality and set up my own script on a cron job.
Automatically deal with conf changes using unattended-upgrades
For Ubuntu servers, I use the unattended-upgrades
package to automate keeping the system and packages up to date. I recently noticed some of Cogneato’s servers showing packages needing to be updated for multiple days. When I looked in unattended-upgrades.log
(in folder /var/log/unattended-upgrades/
), I found the message “WARNING Package something has conffile prompt and needs to be upgraded manually”. Basically, there was a change to a configuration file and it didn’t know how to handle it.
I figured out why the T-Mobile Home Internet router has SMS in its web interface: I had to retrieve an auth code through it to set up my web account.
Continue reading post "#3157"I’ve got home internet again
After three and a half years tethering for my home internet, I’ve given in and switched to “real” home internet: T-mobile Home Internet. Yes, it is cellular just like tethering, but it should allow for a lot more monthly transfer and may have bigger and better antennas and different handling at the tower. I finally gave in because the cost made sense and I feel it will give me more freedom and ease of doing things that require data.
Continue reading post "I’ve got home internet again"HTML + CSS toggle switch
I had to make a toggle switch widget for work recently. I had not done one before, having used built in or custom check-boxes for that purpose. My boss thought the switch would better fit a simple “form” that turns off and on a single setting though, so I made one.
Continue reading post "HTML + CSS toggle switch"Simple MySQL backup script
I made a simple bash
backup script for the newer MySQL database servers at Cogneato.
PHP: Escaping email display name
I recently had the need to take a name from a form submission and use it as the display name of the “From” address of an email sent through PHP’s mail()
function. For an address like Toby Example <t@example.com>
, the display name is the Toby Example
part.
reCaptcha solved by bots?
Some presumed bots figured out the reCaptcha (version 2) we protect forms with at Cogneato.
Continue reading post "reCaptcha solved by bots?"DreamCompute downtime incident 2020
There was another DreamCompute incident leading to downtime of my site / server.
Continue reading post "DreamCompute downtime incident 2020"