Shell Tutorials

  • By
    Count Frames in an Animated GIF

    The animated GIF always makes me chuckle; on one hand they seem like a relic of the "old web", on the other hand they aren't going anywhere and their meme-like presence seem to only make them more popular.  If you browse through my media blog...

  • By
    How to Delete Untracked Files in a Mercurial Repository

    Working around Firefox at Mozilla means that you need to get acquainted with mercurial, the version control system that rivals git and svn.  Like any tool, hg (mercurial) can be difficult until you're well versed with it.  And if you hg import a URL that doesn't match...

  • By
    Regain Disk Space from Homebrew

    One of my favorite utilities is Homebrew, the shell utility for installing and upgrading other utilities -- it's a lazy developer's dream.  Dreams can easily turn to nightmares, however, and I recently learned that Homebrew caches older versions of installed packages, leading to loads of...

  • By
    Reset File Changes with git

    There are many different philosophies when it comes to code review but mine is fairly simple:  I like receiving early "work in progress" patches, I like to be positive in my code review messages, and if a patch is 90% there, I like to finish the...

  • By
    Set a Default Push Remote with git

    During my early days of git usage, my config allowed me to simply type git push instead of git push {origin} {branch_name} which I need to now.  Up until recently I needed to type out the long version...(I know)...which was incredibly annoying because I like using detailed branch...

  • By
    Find Empty Files and Directories from Command Line

    If you are anything like me, you like to keep your projects as tight as possible.  By "tight" I mean no lingering, useless files or directories, because bloat is an incredible annoyance and distraction.  And we don't want distractions, do we? There's a really easy way to...

  • By
    How to Create and Manage CRON Jobs

    Interval or scheduled task execution is used all over computer science, the most obvious use case being transaction batching.  For web developers like myself, the most obvious use case is executing CRON jobs for this blog, including polling for scheduled blog post publishing and a variety...

  • By
    Detect Video Resolution

    Video resolution has always been something I've been interested in, starting with the purchase of my first HD television.  The HD video quality felt life-changing, especially when watching the World Cup, which I'd bought that TV for.  I carried that enthusiasm through to being an early...

  • By
    Faster PR Pulls with Git Aliases

    I love the traditional GitHub workflow of receive pull request, pull down pull request to test, and merge the pull request.  GitHub makes the first and the third steps easy but pulling down pull requests from new contributors requires some boilerplate work that annoys me... ...namely navigating...

  • By
    Create a Password Protected ZIP

    Have you ever wanted to put very basic security (a passphrase) on a file?  You can do so if you ZIP the file -- let's have a look at how you can password-protect a ZIP file! Creating a password protected ZIP file from command line is done...