Fork me on GitHub

Tag: bash

Tag Archives: bash

Bash snippet to remove a line from a file

A while back I was working on a project that involved spooling up and shutting down a lot of Amazon EC2 instances while testing and I was constantly running in to an issue where my ~/.ssh/known_hosts file was out of sync with the server that I was connecting to. Despite how simple it is, I […]

May 5, 2011 | Computers | Comments Off on Bash snippet to remove a line from a file

View man files as PDF

Sometimes viewing man pages on the command line is less than convenient. Ok, its always inconvenient. But there’s a better way: convert the man page to pdf and view it with Preview. Add this to a file, I named mine manv, put it in a safe place (I keep a /bin folder in my home […]

January 18, 2011 | Computers | 1 comment

Automatically download Chromium nightly builds

Updated July 7, 2012: Fixed an issue on Lion where moving old version of Chromium to the trash would fail. Also now opens Chromium after the update is complete. Updated June 9, 2011: The nightlies moved again. The script below has been updated for that change. Updated Oct. 28, 2010: Sometime recently the Chromium nightlies […]

May 29, 2010 | Web Design & Development | 5 comments

Quickly validate PHP files

Ever needed to quickly scan a directory full of PHP files for syntax errors? You can do this quickly on a *nix command line with:  find . -type f -name \*.php -exec php -l {} \;

June 26, 2009 | Computers, PHP Scripting | 3 comments

Client side pre- and post-svn hooks with Unix Aliases

Its probably nothing new but I came up with a way to do client side post- or pre-svn actions. Its nothing revolutionary but has already come in handy. The script is *nix only (though I don’t see why the same process wouldn’t work on Windows if it supports command line aliases like *nix does). I […]

April 23, 2009 | Code, Computers | 1 comment

SSH Connect Script, Hax, Whatever…

I work with many different servers at work. Most tedious part is that I need to ssh in to them on a regular basis. Not all of them can I, nor do I feel should I, be adding SSH keys on to. So I finally got around to writing a little script to hold onto […]

June 26, 2008 | Computers | Comments Off on SSH Connect Script, Hax, Whatever…

“su” to root on OS X without enabling the root user

I guess this is an old unix trick, but I didn’t know it: sudo su – You must have sudo rights (ie: be an administrator). Thanks, Jeremy!

June 4, 2008 | Computers | Comments Off on “su” to root on OS X without enabling the root user

tmbundle update

I’ve been making incremental updates to my TextMate bundle updater for a while now and can finally publish the updated script. It now properly handles updating installed bundles and adds the ability to update only a single bundle and to list installed bundles. Read on for the nitty gritty.

January 17, 2008 | Computers | Comments Off on tmbundle update

Easily install and update TextMate bundles from SVN

This script has been updated This script was updated on 2008/01/17. Since the version released here had a fatal flaw I have replaced the file linked below. Click here to see the details on the latest version of this script. I’m lazy. I’ll admit it. It comes at weird expenses though. I’m too lazy to […]

May 31, 2007 | Computers | 2 comments

Bash me a PDF

UPDATE: Being a linux n00b I didn’t think that even though Ghostscript 7.07 can support everything I’ve done here it doesn’t mean that its been compiled with everything needed to do the job right. My test server at work and my production server both run GS 7.07 but the production server is lacking the EPS […]

January 2, 2006 | Web Design & Development | 4 comments