1. Enable gzip in Nginx

    Posted on in System Administration

    If you have ever used any tool to optimize a web page, you know that compressing the return traffic to the client is a big win. In nginx, this is done with the gzip module. The easiest thing to do is add gzip on; to the http stanza in your …

  2. Geeky Goals for 2016

    Posted on in uncategorized

    The new year is finally upon us. Traditionally, I have not been one to make New Year's Resolutions. This year, I decided that rather than a list of resolutions, I would create a list of goals. These are things I would like to achieve over the next year. In other …

  3. Magento Home Page Returns 404 Status Code

    Posted on in System Administration

    Naturally, I ran into this problem in the middle of the night when the client was asleep and I had no access to the Magento administrative interface. The short story is that after running a re-index of the site, the home page began returning a 404 error status. A bit …

  4. UnicodeDecodeError: 'ascii' codec can't decode byte

    Posted on in Programming

    Although I was getting this output in relation to one of my Jinja2 templates, it really isn't a Jinja2 problem.

    UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 69: ordinal not in range(128)
    

    The bit of code here should be doing nothing more than printing a float …

  5. Implementing 'git show' in Mercurial

    Posted on in Software

    One of my frequently used git commands is 'git show <rev>'. As in, "show me what the heck this guy did here." Unfortunately, Mercurial doesn't have the same command, but it's easy enough to implement it using an alias in your .hgrc.

    The command you would run from the command …

  6. [MacPorts] upgrade gnutls failed

    Posted on in System Administration

    MacPorts logo

    I ran into this issue while trying to install wine-devel on my Mid 2012 MacBook Pro running El Capitan and MacPorts 2.3.4. As the install progressed, here is the error I got:

    Error: org.macports.build for port glib2 returned: command execution failed
    Please see the log file …
  7. [Python] Empty String?

    Posted on in Programming

    I've mentioned before that empty strings in Python are false. This leads to a common if not string paradigm. Unfortunately, this can be problematic. Check out this snippet:

    >>> string = ""
    >>> if not string:
    ...  print("empty")
    ... 
    empty
    

    That pretty much worked out just as we imagined. The empty string returned False and …

  8. {git, hg} Custom Log Output

    Posted on in Software

    The standard log output for both Git and Mercurial is a bit verbose for my liking. I keep my terminal at ~50 lines, which results in only getting about 8 to 10 log entries depending on how verbose the commit was. This isn't a big deal if you are just …

  9. Factory Reset Broken OnePlus One

    Posted on in voice

    This is a sad story. A few weeks ago, I set my OnePlus One down on a table outside so that it would not be in my pocket while I worked on the pool. I have done enough work on the pool to know that at any moment, I might …

My Bookshelf

Reading Now

Other Stuff