The time I ran `rm -rf /`
A lot of sysadmins have had that holy shit moment where they ran rm -rf /
.
Here’s mine.
Shell Tricks: Colorized output
This is part 3 of my series on tricks I’ve used in shell scripts. In this post, I’ll share a few ways I’ve colorized text in shell scripts.
Shell Tricks: Custom ruby shebangs for speed
This is part 2 of my series on tricks I’ve used in shell scripts. In this post, I’ll share a few ways a custom shebang can be used in ruby scripts.
Shell Tricks: Showing help in a script
This is part 1 of a series of quick and dirty tricks I’ve used in various scripts over the years. In this post, I’ll show how I like to provide help text for shell scripts.
Disabling bottles in Homebrew with custom formulae
Homebrew recently added bottles for Vim/MacVim — but they depend on
Homebrew-installed Ruby, Python, and Perl. I prefer to build these from source
so they will use whatever versions of these dependencies currently installed
on my system. Instead of constantly remembering brew install -s vim
to
install from source, I created a couple small formulae that disable bottles.
Introducing `wp-cli-tgmpa-plugin`
I recently dove back into the world of PHP and created
wp-cli-tgmpa-plugin, a WP-CLI package for working with plugins registered
with the TGM Plugin Activation. Check it out if you need to install TGMPA
plugins via wp cli
.
A Simpler Homebrew Formula for WP-CLI
I mentioned in my last post that WP-CLI’s Homebrew Formula includes a
dependency on Composer I don’t need. I spent a few minutes and came up with a
simpler Formula with no dependencies. To install, just
run brew install [--HEAD] itspriddle/brews/wp-cli
. The Formula just
downloads pre-compiled phar files directly from GitHub, this works great for
my needs.
Running WordPress on OS X
I’ve been working with WordPress a lot more lately, and I wanted a way to run it on OS X with as few dependencies as possible. Thanks to WP-CLI and PHP’s built in web server this is now easier than ever before.
wp-cli on a shared host
Here’s how I installed wp-cli on a shared host (HostRocket).
Convert GitHub repo links to GFM in Vim
GitHub allows a shorthand syntax for linking to commits, pull requests and issues: user/project@SHA for a commit and user/project#Num for an issue or pull request. I frequently paste links into Vim when writing git commit or pull request messages, and wanted a way to automatically convert these to the shorthand syntax on save.