So I have a fairly extensive .bashrc file, and one thing you might notice while scrolling through it, is that I have a whole bunch of “step-in” functions. These are functions that replicate some other command for some reason. Primarily this is because I work on both Linux and Solaris, […]
Estimated reading time: 14 minutes
As some of you know, I went to a bit of effort to create a script that tries as many ways as possible to generate random numbers. Some would say I went a bit too far. Overboard. So to speak. So recently I’ve been working on rewriting my passphrase generator […]
Estimated reading time: 5 minutes
For those of you who don’t use Linux or some variant of UNIX in your day to day lives, allow me to explain what locate is. You have a filesystem, and you want to search it for files that may match a particular name, or a pattern. For that, you […]
Estimated reading time: 7 minutes
After deploying check_mk monitoring across a client’s server fleet, it became clear that our previous monitoring wasn’t sufficiently watching postfix queues. Fortunately the impact was minor. We had hosts with sometimes just a couple of dozen non-critical queued mails, we did have one with several tens of thousands of queued […]
Estimated reading time: 4 minutes
[160309/20:49][rawiri@minty ~]$ rand -h rand – generate random positive integers Optional Arguments: -c [count. Number of numbers (Default:1)] -d [debug. Tells you which processing method is used (Default:off)] -h [help] -m [minimum number (Default:1)] -M [maximum number (Default:9223372036854775807)] TL;DR: I made a script that should generate a random integer for […]
Estimated reading time: 11 minutes
So a client has a vendor supplied python script that routinely connects to said vendor’s servers and downloads files. I won’t go into too much detail, but it’s a pretty important file transfer with far reaching financial influence, and we’ll leave it exactly at that. So, as you can guess […]
Estimated reading time: 10 minutes
For those of you who don’t know, shellcheck.net is a fantastic resource for improving your shell scripts. When I came across it, I felt that I was a pretty good scripter. How wrong I was. Using shellcheck has probably been the single most influential factor on my scripting since the […]
Estimated reading time: 2 minutes
As part of my day to day tasks, I’m auditing configuration files and tidying them up. Slowly, we’re moving towards standardised files and configuration management. The first requirement of this is gathering the existing config files into one place. You could do this with any of a number of tools, […]
Estimated reading time: 3 minutes
From time to time, a person may require sudo rights to a particular server for a limited time. If it’s a Linux host, we can use the at scheduler and a /etc/sudoers.d conf frag to automate this. Essentially, we use at to automatically remove the conf frag when the user’s […]
Estimated reading time: 2 minutes
Quality ramblers rejoice! I’m back for a rare quality ramble. Articles for sorting out SSL configs are aplenty if you’re after nginx or Apache, but for squid they’re sadly lacking. So here we are. I have a client who has some pokey old squid reverse proxies. They’re running on RHEL5 […]
Estimated reading time: 9 minutes