Easily prune your ssh known_hosts file

At some point, you’ve probably seen this message when you try to log in to one of your servers: This is really common when you have Amazon EC2 instances behind Elastic IPs because the IP address stays the same (and probably the hostname, too), but as new instances replace old instances, the new instances’ ssh… Continue reading Easily prune your ssh known_hosts file

New git alias: git last

I made a new git alias I’m loving. Maybe you have something similar. I’ve added this to my .gitconfig: [alias] last = rev-parse –abbrev-ref @{-1} This gets the name of the branch you had checked out prior to the current branch. It’s like git checkout -, but you can use it all over, such as:… Continue reading New git alias: git last

WordPress Update Bash Script

I wrote this script some time ago. It’s been working flawlessly for me, so I thought I’d share it here. It could use some progress messages, I suppose. #!/bin/bash DIR= # Put the file system path to your WordPress installation here. E.g., /var/www/html/blog TMPDIR=$HOME/tmp WPDIR=$TMPDIR/wordpress cd $TMPDIR rm -rf latest.zip ./wordpress # Clean up from… Continue reading WordPress Update Bash Script

Bash script: ted

I just wrote a little bash script, “ted” (for Tracking EDitor), which I am loving. You call ted like you would call your usual text editor, and ted backs up the file you’re editing, appending the originial timestamp as a suffix. Then, when you’re done editing the file, ted runs diff to keep a running… Continue reading Bash script: ted