Timeline

Timeline

Using Variables in Bash

February 27, 2024

A few quick tips on using variables in your Bash scripts. Nothing fancy here, just good practices that we often overlook.

Obfuscating Shell Scripts

February 26, 2024

Unix shell scripting language is run by the command-line interpreter and, as such, can be read and understood by anyone with sufficient access and experience. Sometimes this is not a good thing. Sometimes you want people and applications to be able to run the script but not necessarily look under…Read More

WordPress: Post-processing of the image failed

February 26, 2024

This particular WordPress issue appeared with version 5.3 and is refusing to go away. However, the problem here is not with WordPress but with the Apache ModSecurity. The particular ModSecurity rule in question is 200003 that's been giving webmasters a headache for half a decade now.

Calls for a Retaliation after the SolarWinds Hack

February 16, 2024

Armchair admirals on CBS News are calling for a retaliatory attack against Russia after the SolarWinds hack. "We're not willing to attack. And that's what we're missing now. There's no capability that the United States has that scares them enough to not attack us, " said Jon Miller, a former "ethical hacker." …Read More

The Mystery of a Hemisphere

February 9, 2024

To make this long (and embarrassing) story short: a friend's kid had a homework assignment in geometry to calculate the surface area of a conjoined cone, a cylinder, and a hemisphere.

Raspbian ‘partitions on different devices’ Error

February 8, 2024

After downloading a Raspbian image and writing it to an SD card, you get the following error when trying to boot the Pi: "Could not expand filesystem, please try raspi-config or rc_gui. Boot and root partitions are on different devices".

Tmux Bootstrap Configuration

February 6, 2024

Just a list of commands to quickly configure tmux with some of the best (i.e. my favorite) plugins and options. Feel free to disagree - you may be right - but I don't think so.

Find Large Files

February 5, 2024

Every time a filesystem is running out of space and I need to find something to delete, I end up googling the syntax for the find command to make sure it stays off NFS and doesn't cross mountpoints. Finally, I decided to write this basic script.

Clone Raspberry Pi SD to Larger Card

January 30, 2024

This is more of a note to myself: every time I need to clone the RPi card, I end up googling things for an hour. The process is two-fold: clone the SD and resize the filesystem.

Encrypted Volumes and Portable Apps

January 29, 2024

This is a description of an uncomplicated setup for an encrypted volume and portable applications for a Windows laptop consisting of a USB3 storage device, VeraCrypt OSS OTFE, a hardware password wallet, and portableapps.com software.

Fixing Sudo

January 28, 2024

A decade-old massive and easy-to-exploit security hole (CVE-2021-3156) has been found in sudo allowing for full root access by any unprivileged system user. This is one of those rare security bugs you can't delay remediating.

A Wrapper Script for unrar

January 24, 2024

Just a straightforward wrapper script for the unrar command that allows extracting specified filetypes from multipart archives while utilizing all available CPU cores.

Convert XLSX to a MySQL Table

January 21, 2024

Some people find it hard to let go of Excel even when the situation is ripe for a database. And so dozens of different versions of the same spreadsheet edited by many people are floating around Sharepoint, and nobody quite knows which one to use.

Detect SSL Certificate Injection

January 17, 2024

When the SSL Digital Certificate is intercepted and replaced by a device between your browser and the Web site, we call it certificate injection. This method is more commonly used not by hackers, but by corporate IT security utilizing appliances known as SSL sniffers, such as Blue Coat ProxySG or…Read More

SSL For Self-Hosted WordPress

SSL For Self-Hosted Wordpress
January 15, 2024

Just some notes for setting up SSL with your self-hosted Wordpress installation. Just got around to doing this the other day. Yeah, I know, about time...

Show Logged In Users During a Time Window

January 14, 2024

Let's say you want to see who was logged in on the server during last weekend. This includes users who, say, logged in on Thursday and haven't logged out until Saturday afternoon.

Luxembourg 2017

January 14, 2024

A day-tripper to Luxembourg during my stay in Paris. Mainly because I wanted to ride the TGV. I like trains and this was my favorite. Most photos were taken using Nikon D7000 with Nikkor 24-120 lens and a mini-tripod. I learned three things about Luxembourg and its inhabitants. First, don't arrive…Read More

London 2017

London 2017
January 13, 2024

A few photos from my late-notice business trip to London in 2017. Most photos were taken using Nikon D7000 with Nikkor 24-120 lens and a mini-tripod. I stayed there for two weeks at the bedraggled Britannia International hotel in Canary Wharf. The hotel still had some of that Thatcher-era luster…Read More

Securing VSFTP with TCP Wrappers and IPTables

Securing VSFTP with TCP Wrappers and IPTables
January 13, 2024

I've been drinking beer and perhaps had one too many. Regardless of the reason, I felt the urge to further secure my favorite server. The target of my paranoia is once again the VSFTPd. I already have iptables and fail2ban running with various elaborate rules and filters. And this is…Read More

When Was that Server Built?

When Was that Server Built?
January 12, 2024

Just a quick note on how to (sort of) figure out when a server first came online. This can be useful to various folks in your bean-counting department working on maintenance contract renewals and whatnot. The idea is simple: figure out when the root filesystem was created and, in all…Read More

Deleting Lots of Files Quickly

Deleting Lots of Files Quickly
January 12, 2024

I am not talking about hundreds or thousands of files. I am talking about hundreds of thousands. The usual "/bin/rm -rf *" may work but will take a while. Or it may fail with the "argument list too long" error. So here are a few examples showing you how to…Read More

Bash and Expect Snippets

Bash and Expect Snippets
January 12, 2024

A small collection of maybe helpful examples of how to use expect with Bash. This is a very useful tool, especially when writing a better script is just too much work, but the funky syntax gets me every time. I have various expect examples scattered throughout this site, so this…Read More

Taking Linux Temperature

Taking Linux Temperature
January 11, 2024

Just some notes on setting up temperature monitoring and alerting on CentOS/RHEL running on HP ProLiant. The first step is to install lm_sensors:

Find + Rsync + Xargs

Find + Rsync + Xargs
January 10, 2024

Just some quick syntax for running multiple rsync threads in parallel using find and xargs. In many cases (especially if NFS is involved)  this can greatly speed up the copy operation.

Tracking Network Connections Over Time

Tracking Network Connections Over Time
January 10, 2024

Firewall changes, datacenter migrations, application re-hostings, server decommissions are just some of the activities where having a record of network connections over time can help avoid confusion and unplanned downtime. To capture all network connections, you would need to run tcpdump. However, this approach requires lots of local disk space…Read More