A blog probably of interest only to nerds by John Morton.


Tutorial: Using Gulp with htmlprocess and concatenate

I’ve been teaching myself Gulp recently. I found the basics easy to pick up. Although I didn’t consider myself a Grunt expert, I’d taught myself Grunt previously and that helped with me with Gulp. Before we go further, check out the GitHub repository that contains the finished example project we’ll go over here: [https://github.com/johnfmorton/using-gulp-htmlprocess-example](https://github.com/johnfmorton/using-gulp-htmlprocess-example "johnfmorton/using-gulp-htmlprocess-example") One thing I have seen in both Grunt and Gulp workflows I’ve used from their repositories was a script code... + read on

Automate daily database backups with crontab and SFTP and be the master your domain.

I recently worked on a site which saved data in it’s local database which needed to be collected and sent each day to a remote server via SFTP for analysis. Needless to say, I didn’t want to manually do this process every day, but I had never fully explored cron jobs, so I had to teach myself about cron jobs while I figured out the problem at hand. Here’s how I ended up automating the... + read on

    Google Analytics, Ghostery, and Event Tracking

    At the time I write this post, Google Analytics has a new version in beta called “Universal Analytics”. It’s basically Google Analytics version 3. This means that code you may have relied on during the version 2 of Google analytics may no longer work. Google suggests that all new projects moved to version 3 now. It does offer “real time” analytics, so you can see who is on your site at that very moment. That’s... + read on

      Use a cookie to iterate between visits with PHP.

      Here's a small code snippet that I use to increment a value between visits using a PHP cookie. I use it, for example, when I have 3 different images that could go on a page, and I want to serve up the next one in the sequence on subsequent visits to the page. I just use the "$num" where appropriate. You can edit the '2' in line 14 to change the wrap around value to... + read on

        MAMP and Navicat and Character Set Hell.

        I’ve used Navicat for years. I’ve used MAMP Pro for years. Both tools are must haves as far as I’m concerned, but I had been having problems with special characters being corrupted for nearly 6 months. Every curly quote, m-dash or umlaut was torturous. Briefly, the problem was that those special characters (like curly quotes) would be changed to question marks in my database after I had migrated it to or from my local development... + read on

        Auto Print an HTML Page

        I recently worked on a project for a client who wanted to allow a user to view and print a number of recipes directly from a Flash banner. There were all the other ways of interacting with the recipes as well, like emailing, sharing on Facebook, and sharing on Twitter. (I don't go into those other thing in this post, but you can find me talking about how to do things like that elsewhere on... + read on

          Untangling MX: Setting up DNS records for a web site with different mail server.

          I recently had to set up an MX record for a client and although I’ve set them up before, it suddenly made sense to me in a way that it hadn’t before. Perhaps my story will help someone else have a similar epiphany. Basic name server set up. My client had their site and their mail all handled by the same serving company. This meant their name server records were basic. There were 3 entries... + read on

            A Quick Way To Password Protect a Web Page.

            There are a variety of ways to password protect pages online. Perhaps the easiest is to use an .htaccess file. The reason this is the easiest way is because it’s built into the control panel at many hosting companies. I use Dreamhost and it’s control panel makes it automatic. Sweet. If you don’t have that as part of your hosting package, check out this article at htmllite for a walk through on do it yourself... + read on

              The Passing of Michael Jackon and Mass Media.

              ![Michael Jackson standing next to a can of Pepsi]({asset:51}) Yesterday was Michael Jackson’s Memorial service. The world mourned. Yes, the world mourned. As I watched TV with much of the world, I wondered what we were really mourning. I didn’t ask that as a way of disparaging Michael’s talents. I’ve been a fan of his music, like you probably have too. But the fact that I can even say that you were probably a fan... + read on

                Being a Geek on Election Night

                I spent election night using technology to an extreme. Twitter, Facebook, Text Message, and a variety of sites and widgets. My friend Eduardo, aka Dudu, in Brazil and I, in New York, exchanged quite a few tweets about the night’s outcome emerged. Social technology allowed this great night to be enjoyed by a huge number of people all across the globe and I’m very happy to have been a part of it. Dudu asked me... + read on