Timeline
Killing Process Network Access
Imagine this scenario: a particular process on your server is connecting to a host outside your internal network and you don't like that. On the other hand, you can't just kill that process because you need it.
Generating and Running Multiple Scripts
Admittedly, this has a limited range of practical applications and is more of a scripting exercise. The command shown here generates a bunch of temporary scripts each containing the sleep command for up to one minute.
Removing Chef Server Installation
Just a quick note on how to completely remove (more or less) Chef server installation from a CentOS/RHEL box.
Installing t CLI power tool for Twitter
The 't' is an excellent Ruby-based CLI utility for interacting with the Twitter API written by Erik Berlin. This is certainly not the only such tool available, but, in my estimation, it is the most full-featured and expertly-written. No amateur-hour coding here.
Keeping Abreast with Filesystem Changes
The inotify is a Linux kernel sybsystem for notifying user-space applications of filesystem changes. I always thought this exceptionally handy utility was under-appreciated or at least underutilized.
Resizing Photos for Instagram
Instagram is being a pain in the neck by limiting support to specific aspect ratios. Currently, you can only upload photos of no less than a 4/5 ratio for portrait mode and the peculiar 16/8.377 ratio for landscape shots, which is just a smidgen over the standard 16/9. Neither ratio…Read More
Curated Downloads
A curated list of useful or otherwise interesting (to me) downloads. These are all things I installed, configured and, at the very least, played with for a few days. I will add a lot more stuff to this list, time permitting. Please do offer suggestions as comments. If you fancy…Read More
Grouping Output of SSH via xargs
To make a long story short, I have a list of servers where I need to execute a command and get back the output. Using a for loop to run SSH with key authentication is the usual approach, except in this case accessing one server at a time was taking…Read More
Exporting WordPress to Markdown
WordPress is my favorite CMS, but the complexity and security issues introduced by PHP and the database are unnecessary in some cases. Migrating to a static Web site may be a better option when it is all you need.
QNAP NAS Performance Analysis
The QNAP Resource Monitor utility available via the Web UI provides a lot of useful functionality with good visual presentation. However, sometimes you need just a little bit more detail to help track down a particularly elusive performance issue.
Auto-Update /etc/hosts
This was a silly solution to a silly problem, but may come in handy in the future for other things. A user process was establishing frequent connections to a handful of FQDNs. Not having any IP caching capability, every connection attempt was preceded by DNS lookup.
Find Large Folders
When you get a filesystem space alert (and they tend to arrive at 3:37 on Saturday morning), deleting various supersized log files is one option I already covered in adequate detail. That is if you get so lucky as to find such a file to delete...
Laziness vs Phishing
Here's an interesting article [efn_note]"How Coinbase Phishers Steal One-Time Passwords – Krebs on Security." 14 Oct. 2021, krebsonsecurity.com/2021/10/how-coinbase-phishers-steal-one-time-passwords.[/efn_note] detailing the methods scammers use to steal your one-time passwords for Coinbase.
Awk & sed Snippets for SysAdmins
Books have been written on the subject of awk and sed. Here's a small sample of commands I put together over the years that are useful for everyday system administration tasks. Most of these tasks involve reformatting strings and files, which is why I decided to bundle tr, cut, and…Read More
Synology NAS Hacks
I've been using various Synology NAS devices for many years now, and they're great. Well, almost. There are a few rough spots that don't thrill me. These consumer-grade devices are designed to be difficult to break by people who know little about computers. This approach also annoys the living daylights…Read More
Finding Duplicate Photos
Being a shutterbug and a digital hoarder can get expensive. A couple of days ago, my TerraMaster D5-300 5-bay DAS crashed. Again. This time it was the power supply. I replaced it only to discover that my RAID 5 volume is toast. It was still rebuilding the failed drive I…Read More
Inventory Network Services with Nmap
With the growing number of network-enabled devices in your home, meaningful security becomes elusive. The first step to addressing the situation is knowing what you have. A few examples below use the nmap utility to scan your local network and detect active devices and services.
Benford’s Law in Bash
Benford's Law, a curious mathematical phenomenon, asserts that in many real-world numerical datasets, the leading significant digit is more likely to be small. This observation, far from being merely intriguing, can be a powerful tool for distinguishing authentic data from manipulated or fabricated ones.
Maryland Renaissance Festival
The second largest fairy of its kind in the US has been operating in Crownsville, MD, sine 1977. The event is centered around a permanent Tudor-style village and is open in September and October. Every year the theme of the festival is based on a different year of King Henry…Read More
Collatz Conjecture in Bash
The Collatz conjecture is a math problem from the mid-1930s. It involves an algorithm that starts with any positive integer, and then each following number is made by taking the previous number and changing it. If the number n is even, you make it half of what it was (n/2).…Read More
Simple Math from Bash Command Line
Chances are, most shell scripts you write will require some math operations, even if it's something as simple as incrementing a variable inside of a loop. As with everything else in Linux, there are multiple ways of accomplishing the same task. Here's a quick look at some of the options.
Focus Stacking with Lightroom and Photoshop
Not the usual topic for this blog and not the most comprehensive guide on the subject out there, but here I go anyway. Focus stacking combines multiple photos taken at different focal distances into an image of greater depth of field.
Generating Honeypot Data Structure
I've been fiddling with my inotifywatch scripts to make a better "early-warning" system for ransomware detection and realized I needed a more realistic honeypot data structure. Ransomware is getting more clever and is no longer easily fooled by dummy files from /dev/urandom or popular file collections.
Peculiar Linux Command-Line Tools
Some Linux CLI commands I type every day, probably hundreds of times. Others - on a rare occasion. But there's a category of truly esoteric utilities tailor-made for some singular and often exotic purpose. I heard of many - if not most - of these utilities, but it's difficult to…Read More
NFS I/O Stats with Logging
The nfsiostat is an excellent tool for analyzing NFS performance. The only major problem with this utility is that it's designed to be used interactively. It does not have logging or timestamping capabilities. I needed to get information about NFS mount performance during a nightly backup, and I didn't really…Read More