Image of the glider from the Game of Life by John Conway
Skip to content

{ Category Archives } Scripting

Use wget(1) To Expand Shortened URLs

I'm a fan of all things microblogging, but let's face it: until URLs become part of the XML, and not part of your character count (which is ridiculous anyway), shortened URLs are going to be a way of life. Unfortunately, those shortened URLs can be problematic. They could host malicious scripts and/or software that could […]

How To Properly Create And Burn CD/DVD ISO Images From The Command Line

Too often, I see the recommendation on forums, IRC, and elsewhere across the internet to use improper tools for creating ISO images. For example, consider the following two commands, both of which are not the correct way to build a CD/DVD image: $ dd if=/dev/scd0 of=cdimage.iso # NO! Or worse yet: $ cat /dev/scd0 > […]

Avoid Using which(1)

This post comes from BashFAQ/081 on Greg's Wiki. He argues why you should not be using which(1) to determine if a command is in your $PATH at the end of the page. I'll put that argument at the front: The command which(1) (which is often a csh script, although sometimes a compiled binary) is not […]

Setting Up Mutt With S/MIME And PGP/MIME

If you have two accounts that you use with Mutt, and one of them you would like to use your OpenPGP key for signing mail (PGP/MIME), and the other you would like to use an OpenSSL certificate for doing the same (S/MIME), then this post is for you. Before beginning, however, you need to have […]

Use Your SSH Client To Help Prevent Stupid Mistakes

I have chosen the path of system administration for my career. It's been very rewarding, and I really love my job. However, there are times when I make stupid mistakes that cost others money. I'm sure we've all been there. It's stressful, embarrassing and can really shake you up, if you mistake is bad enough. […]

My Tmux Hardstatus Theme

Recently, I've made the switch from GNU Screen to Tmux for my remote terminal multiplexor. I still prefer GNU Screen for serial connections, however (something the Tmux developers don't seem to think is important). So, when getting it setup, I wanted my hardstatus line to imitate my GNU Screen hardstatus line as closely as possible. […]

Announcing Penny Red

This is my first open source project that I've started and maintained, so I'm pretty excited about it. I was upset at the current offerings of Hashcash for the various MUAs, so I set out to do something about it. You've already read on my blog about my solutions for minting and verifying Hashcash tokens […]

Verifying Hashcash Tokens With Mutt

Just five days ago, I blogged about minting Hashcash tokens in Mutt using a Python script (make sure you check that page for any updates to the source if you're using it). Well today, I finished writing my verification script. It takes some additional changes to your ~/.muttrc, which I'll outline here, and it requires […]

Hashcash and Mutt

Introduction I wanted to used Hashcash with Mutt, for nothing more than a curiosity to see if it generates any discussion, and to see if people notice. Further, I'm a big crypto advocate, and while Hashcash isn't exactly crypto, it's highly related to it, and uses it. Regardless, I wanted to see if I could […]

My ZSH, Irssi and Screen Themes On White And Black Backgrounds

Now that school is out for the summer, I have a bit of time to work on some of the themes I've created for my ZSH prompt, Irssi and GNU Screen. The first focus of mine was to get all themes working well with both white text on black backgrounds, and black text on white […]

Add Colors To Your ZSH Scripts

I was writing some scripts this morning to help me keep the Unix and Linux server I administer at work up to date with their NTP time synchronization. As I was going along, I thought to myself, "I'd like to see some color in the output." Thankfully, I already had the code in my ZSH […]

More ZSH Prompt Love

Ever since discovering ZSH 3 years ago, I've been addicted, but it wasn't until a good 2 years into using the prompt on a daily basis that I decided to do some radical work with my prompt. I've blogged about this before a couple times, making improvements along the way: post 0, post 1, post […]

Password Policies Suck

I've been getting a flurry of emails at work, reminding me that my passwords are about to expire on several Unix and Linux machines in our production datacenter. They have a policy in place, where the password much be changed every 90 days, and I have to keep my current password for at least 7 […]

Add Vim Editing Mode To Your ZSH Prompt

I've decided to go back to vi mode with my shell. Of course, by default, BASH, ZSH and others use emacs mode for the keyboard bindings. This is fine for the generic case, but if I'm using Vim for my default editor, it makes sense to use the Vi keyboard bindings in my shell as […]

DASH on Ubuntu

A couple recent posts have started on the Utah Open Source Planet regarding popd and pushd not being available on a default Ubuntu install. As discovered, popd and pushd are shell built-ins for the BASH shell, and not provided by the Debian Almquist Shell (DASH). Why has Ubuntu made the change from BASH to DASH […]