Quick Tips Tutorials

  • By
    Serve a Directory via Python

    Sometimes I'm working with a test HTML file and some JavaScript but need to work off of a served space.  In that case, I sometimes need to swap out folders within MAMP Stack which leads to a maintenance nightmare.  Bleh. I recently found out that you can...

  • By
    Follow Redirects with cURL

    I love playing around with cURL. There's something about loading websites via command line that makes me feel like some type of smug hacker, just like tweeting from command line does. I recently cURL'd the Google homepage and saw the following: I found it weird that Google...

  • By
    Copy a Directory from Command Line

    Copying a directory for the sake of backup is something I do often, especially when I'm trying to figure out why something isn't working when I use an external library.  I'll copy the directory structure as a backup, mess around with the original source until I find a solution...

  • By
    Add Styles to Console Statements

    I was recently checking out Google Plus because they implement some awesome effects.  I opened the console and same the following message: WARNING! Using this console may allow attackers to impersonate you and steal your information using an attack called Self-XSS. Do not enter or paste code that you...

  • By
    File Extension Change Shortcut

    Changing the extension of a file seems like something you would do often enough to know how to do it from command line.  One annoying part of moving a file is repeating the file name a second time when all I want to do is change the...

  • By
    Get Image Dimensions from Command Line

    The command line is a gold mine if you come from the perspective of a UI lover.  Getting information from the shell instead of opening an app, finding a file or directory, etc...what a novel concept.  Opening different image files opens up different apps on my Mac...

  • By
    git: Delete All Branches but Master

    Maintenance is incredibly important in any project, but if you want to take your professionalism to the next level, you should keep your git environment in shape.  Unfortunately I'm not that guy -- I leave git branches laying around, even after they've been merged into master.

  • By
    File Input accept Attribute

    The HTML5 revolution provided us several simple but important attributes like download, autofocus, required, novalidate, and placeholder.  There's another one you may want to know about:  accept.  The accept attribute is useful for input[type=file] elements.  Let's have a look at it! The HTML I'll...

  • By
    Get IP Address from Command Line

    Over the past few years I've needed to look up my IP address a dozen times.  What's funny is that I don't recall why I needed it, I just did.  So what's the easiest way to get my IP address from the command line? To get your internal IP, you...

  • By
    Loading Static Templates for Intern Testing

    I use Intern by SitePen for all of my JavaScript functional testing.  Intern has loads of features other functional test frameworks don't and it's completely Promise-based -- something I got very used to when I used the Dojo Toolkit every day. Async test creation can...