Using Google Analytics in your Single Page Web Application

On break the other day I had a thought: “Why not log all activity in our web application with Google Analytics”. These coffee-break thoughts are quite common for me and sometimes they turn out to be more than caffeine-fueled delusion.  Now this is a b2b application and you generally wouldn’t think about such a thing since Google Analytics is used primarily by online marketers and SEOs. Still I think there is value in seeing what pages are browsed most frequently as well as the power to log HTTP Errors. Given that we are a mostly single page AJAX driven application a little extra work had to be done. Here’s how to implement Google Analytics in your own application.

Building a jQuery DataTables Plugin

I like datatables and use it a lot at work. I’ve used datatables so much that I’ve written a CakePHP plugin for it, creatively named CakePHP-Datatables. Documentation on creating plugins is a little rough though. It took me quite some time to write my first one, so I decided to give a little back, and take you through creating a very simple plugin called, My Button. This plugin will add a button to your datatables instance.

Accessing Files Outside of a Chroot Directory

Just recently I needed to provide access to my home system for a remote designer. To prevent the designer from accessing anything else on my server I found this nifty trick. I setup the designer with a user account that has FTP access. I set the home directory as a chroot, and then to get around not being able to add a symbolic link with the home directory I mounted the path to the files. Here’s how I did it using VSFTP.

DOM optimizations with jQuery

I really do enjoy optimizing applications. Up until this project most of my experience was in MySQL and PHP optimizations so optimizing a client side application written in JavaScript is a new challenge for me. The product I am blogging about contains a custom work order entry screen which utilizes the JQuery library extensively. It does heavy DOM manipulations and event bindings to speed up the entry process for the user.  We began noticing some slowness on large work orders with over 50 lines. No big deal though until you hit 200 and then it becomes very noticeable.

Why I’m a Tor Relay Operator

It’s over 3 weeks into 2014 and most of you have failed at your new years resolutions. It’s okay so have I. My resolution was to make and accomplish at least 1 goal a week, thats 52 resolutions! My first goal was to setup a tor relay. Which seems easy enough. I use Linux exclusively and documentation is readily available. Still here I am, 3 weeks into the new year and no Tor Relay. Why?