Shell Tutorials

  • By
    Convert Videos (MP4, MPEG, or MOV) to WEBM

    In an effort to make the web and media more efficient, developers and corporations everywhere are investing effort in creating better file formats and delivery streams.  One of the more impressive video formats I've seen is the WEBM file format.  WEBM files are quite small but the quality is...

  • By
    Create Screenshots from Videos

    The idea behind my Get the First Frame of an Animated GIF with ImageMagick post was to improve a page's performance by not loading an animated GIF automatically, but instead grab the first frame, display it, and allow users to "click to activate" the GIF.  That strategy...

  • By
    Create Image Thumbnails with ImageMagick

    ImageMagick is, for lack of better term, magic.  You can throw just about anything at it and succeed.  With that in mind, I was recently using Google Page Speed to see how I could improve my website and it occurred to me I wasn't generating thumbnails for...

  • By
    Convert PSD to PNG from Command Line

    I've been fascinated by basic image manipulation these days, which led to my Get the First Frame of an Animated GIF with ImageMagick and How to Create Screenshots in Firefox posts.  It was brought up in a comment to the Animated GIF post that ImageMagick can also...

  • By
    Get the First Frame of an Animated GIF with ImageMagick

    ImageMagick has been the industry standard for image manipulation for as long as I can remember.  Hell, I remember using the ImageMagick extension when I first learned PHP over a decade ago.  Anyways, I've noticed recently that many sites which host animated GIFs will have a static image initially and will...

  • By
    How to Batch Update Git Commit Messages

    At Mozilla we're mostly strict about receiving contributions via git/GitHub.  Aside from requiring tests and enforcing code quality, one basic of submitting a commit (or several) is that the commit message begins with "bug #######", which is a reference to its Bugzilla bug.  The message requirement makes sense...

  • By
    Install NPM from Command Line

    I was trying to update my version of NPM using NPM but long story short, a permissions issue allowed NPM to be removed but not re-installed, and thus I was hosed -- NPM was nowhere to be found on "Walshbook Pro."  Eeeek.  Well, you can install NPM via...

  • By
    How to Open a Website from Terminal

    Every once in a while I want to open a website from the terminal ... just because.  Maybe it's because it makes me feel just a bit more hardcore, you know, not clicking a GUI icon.  Anyways, opening a browser via the command line is dead...

  • By
    Copy Shell Output via the Command Line

    Oftentimes I'll want to copy the output of a shell command execution but can't get the whole output because it's larger than the terminal's buffer length, so I'll need to write to file for easy viewing, or I'll simply be annoyed that I have to click-hold-drag...

  • By
    Reset a Branch to Remote State with git

    Every once in a while I accidentally hose my repository's master branch by merging or committing something I shouldn't.  And then on rare occasion I push that to my remote and then things get all sorts of messed up.  Every PR from that point on has...