Nightly Backup MySQL data to Amazon S3

Running within the Amazon Web Services ecosystem has some pretty awesome perks for system admins and developers alike. Since I run a lot of different systems on EC2 instances I have found it very useful to have the databases backed up on an automated schedule. Using AWS’ CLI tool it is very simple and straightforward […] Read More

Protecting Apache with fail2ban and mod_security

Since I run a lot of custom servers I have found the open source tool fail2ban to be quite useful! Fail2ban is an open source log based IP bouncer. Essentially it reads specific logs that you configure and adds abusive requests to IPTables to be dropped. It should be available on most linux systems via […] Read More

Angular 2 with Socket.IO Beer Tasting Party Study Application (Part 3)

Preparing our Angular 2 Environment We’re going to start off by setting up the environment as suggested in the Angular 2 Typescript Quickstart guide. We’re going to diverge a little bit and not use the ‘lite-server’ so that we can use gulp to watch and reset our server connection as needed. First we’ll start with […] Read More

Angular 2 with Socket.IO Beer Tasting Party Study Application (Part 2)

Seeding our project If you are following along install the seed as the directions under ‘How to Start.’ I named my project ‘bee.rs’ because I will be hosting it from a Raspberry Pi for the beer tasting party (using special routing rules on my home DD-WRT.) Don’t worry, when the project is done, I will […] Read More

Angular 2 with Socket.IO Beer Tasting Party Study Application (Part 1)

In this multi part blog series I will be building an Angular 2 application with Node using Socket.io as a realtime communication facilitator. My learning process has always been such that, I must use a technology for some practical purpose to have a good working knowledge base from which to pull if I plan to […] Read More

Simple MySQL Linux CRON monitor

Sometimes it becomes necessary to put a simple monitoring service in place for MySQL databases that crash occasionally due to a slim system configuration or other hard to control factors. This script and CRON job can monitor your database for just such an occurrence. First SSH into your server instance. Create a new Bash script: […] Read More

Setting up Apache Vhosts on AWS Linux

If you plan to host multiple sites on a single AWS instance and you are using Apache, this is the guide for you! 1) Navigate to your instance’s Apache configuration directory: [ec2-user@ip-999-99-99-99 ~]$ cd /etc/httpd/conf.d 2) Create a vhosts config file: [ec2-user@ip-999-99-99-99 ~]$ sudo nano vhosts.conf 3) Supply some <VirtualHost> directives to point to the […] Read More

The Next Hot Web Tool Brought to You by … Microsoft?

The next hot web tool is about to explode and quite surprisingly to many of us it was created by Microsoft! TypeScript is best described as a JavaScript ‘dialect’ (credit to Anders Hejlsberg) for coining that terminology. TypeScript isn’t the first of its kind. before TypeScript came CoffeeScript, Dart, Scala.js, ClojureScript and more than 250 […] Read More

Up and Running Fast With LAMP On AWS EC2

This tutorial covers setting up a LAMP stack on a free-tier EC2 instance. Setting up and managing an Amazon Web Services EC2 server can be a pretty intimidating task the first time around since the process is so much different than other hosting services with little to no options for server configuration (here’s lookin’ at […] Read More

NodeJS Efficient Multithread Process Management

One of NodeJS’s major platform caveats is the fact that it runs on a single thread. Furthermore this thread can only consume approximately 1.5gb of RAM (a V8 feature). This means that if your server has more than 1 CPU core or more than 1.5gb of RAM you may be using less than 50% of […] Read More

Super Simple PHP File Cache

If you are using a PHP version > 4.3.0 you can use this ultra simple file caching method to cache any kind of dynamic data. If you’re doing API calls or using PHP to pull data from another server it’s always good to implement some kind of caching layer. $exists = file_exists(‘something.cache’); if( !$exists || […] Read More

How Programming Taught Me Success

Dictionary.com‘s first definition of success is “the favorable or prosperous termination of attempts or endeavors; the accomplishment of one’s goals.” Programming taught me that before success comes failure. In fact, more literally it taught me success looks more like this; fail, fail, fail, fail, success. Programming taught me perseverance. Programming brought intimate understanding of this […] Read More

Rapid app prototyping with AngularJS and CouchDB

Modern application prototyping in the web world has come to a point where creating an application can be about as fast (or faster) than detailed specifications can be written! How is this possible? Fire the back-end developer, you don’t need ’em! Using AngularJS and CouchDB you can create a virtually ‘back-end free’ application. Let’s dive […] Read More

Node.js streams and websockets build better web applications

Since the inception of the internet the predominant data transfer paradigm has been the traditional Request/Response method with the HTTP standard. With this method the client issues a request via headers and possibly a body of data sent to a server, the server parses the request and generates a response. When the response is fully […] Read More

JavaScript Gets Classy!

If you are a Web Development professional, and you haven’t been living under a rock, you’ll know that some pretty excited stuff is coming our way with ECMAScript 6. One of the most exciting additions is classes. This will eliminate the need to use syntactic sugar to create class-like structures from functions. The use of […] Read More

Tips for Better Web Development Productivity

Bug lists, feature requests, client calls, meetings, cat videos on Facebook; there are many distractions vying for our attention as Web Developers. With new technologies and frameworks constantly springing up needing to be assimilated into your tool belt, productivity and time management probably are not high on the list of priorities. You’d be surprised how […] Read More

Using AngularJS with SVG for rich graphical interactivity

First of all, down with Flash! Using flash used to be your only real option when creating rich interactive graphics driven designs for web applications. Does anyone remember Homestarrunner? When desktop computers and occasionally laptops were the only real interface for the internet, flash was acceptable. With the recent influx of traffic from mobile devices […] Read More

Better WordPress Shortcodes

WordPress has become a powerhouse in the build-and-host-it-yourself web world and due to that increasing popularity, there is also a ton of (not optimal?) code floating around out there. When developing code for WordPress you have to be mindful of the need to maximize compatibility across many versions of PHP and server settings, as well […] Read More

Understanding The Modern Web Solution Stack

A web solution stack is a group of technologies that when combined, create the backbone for a modern web application. Understanding the stack as a whole and how to use each technology best is very important for a ‘full-stack’ web developer. With the recent emergence of JavaScript libraries like AngularJS and Ember.js the placement of […] Read More

CSS to Maintain Aspect Ratio

Here’s a cool trick on how to maintain a div’s aspect ratio when working with responsive designs. CSS .four-three { padding-bottom: 75%; width: 100%; background-color:silver; } This trick can be really powerful when combined with a responsive CSS framework like Bootstrap. A common use case is a row of images that need to retain their […] Read More

Hello World!

Those words evoke a memory of the first time I compiled a C++ program and the compiler didn’t throw up. Yes, that’s when I knew I was destined to spend my time hacking in front of the soft glow of a couple CRTs. It may not be as glamorous as the rich and famous developers […] Read More