Using Vim Keybindings on the Bash Command line in a remote shell

January 4, 2016

The core philosophy of the Vim editor is accomplishing editing tasks with as few keystrokes and hand motions as possible.
Commands are short and succinct to minimize hand motions and keystrokes, and moving your hands to a mouse or even the arrow keys on your keyboard takes away precious seconds or fractions of a second that distract your brain from your editing task at hand. And once you've become proficient at this form of editing, using a standard editor is just not the same. There are even ways to make your browser more like Vim. Taken to the terminal, one essential tool that I now can't live without while working on the command line is Bash's Vi editing mode.

Read More|Comments (0)

Building a Raspberry Pi Music Player for less than $55

December 23, 2015

By the end of this post you will be confident in building a Raspberry Pi streaming audio music player that plugs in to any speaker and is controlled by your smartphone to play internet radio stations, Spotify,, or locally stored music, or act as an Airplay speaker for your iTunes library or apps like Pandora.

I recently put one together and it's been working great. The hardware components are simple to put together; they mostly just snap into place. Here's what I used for mine:

Grand Total $54.45

Read More|Comments (0)

Setting up a Laravel application on a Dreamhost shared hosting account - Updated for Laravel 5

December 15, 2015

A ways back I wrote about how to set up Laravel on a Dreamhost shared hosting account. I've still been using Laravel Forge and Digital Ocean for all of my production deployments, but a shared host is really nice for a quick prototype or low-budget application.

This post will list some revised steps for getting a Laravel 5 application deployed quickly on a Dreamhost shared hosting account.

To view my earlier post, click here. Read on for updates to the instructions for Laravel 5.

Read More|Comments (0)

Making Your Bash Prompt git-aware and Other Fun Stuff

November 3, 2015

This post covers how to use a plugin to stylize a bash prompt with git-specific information. Once you see how this is done, it will be easy to add many more advanced styles and useful information to your bash prompt.

Let's start with a simple bash prompt. This is stored in a variable called PS1 and can be set in your .bash_profile file in your home directory so that it is loaded any time you open a shell.

export PS1="\u@\h \w$ "

Bash interprets several substitution variables, escaped with \. The above will give a prompt that shows your username (\u), hostname (\h) and current working directory (\w). Any other characters, such as the $ and space will be interpreted literally and printed on the command line. Once loaded it should look something like this:

Simple Bash Prompt

By the end of this post your bash prompt may look something more like this:

Advanced Bash Prompt

Read More|Comments (0)

Setting up Beanstalk Console on Laravel Forge

February 3, 2015

Using queues in Laravel is a great way to offload any task that can be executed asynchronously from the main processing thread of your application. They are quite easy to use and the only thing I'll say about implementing them is that the sync driver provided in the Laravel distribution allows you to start coding them even before you have a queue provider set up. You can read more about how to use queues here or here for Laravel 4.

Once you're ready to deploy your code to production, you can set up one of several different queue providers. I choose Beanstalkd which is super easy to set up in my production environment of Laravel Forge at Digital Ocean.

Read More|Comments (0)

Usability Testing With Peek

December 19, 2014

After a casual idea suggestion from a friend I recently spent an afternoon building a URL Lengthener. The opposite of a URL Shortener, it makes URLs longer (or shorter) by adding any amount of free form text to a URL. It was a fun, quick project and I wanted some feedback on it, which is when I found out about Peek.

Peek is a free service provided by UserTesting that almost instantly puts your website in front of a real person willing to give you real usability feedback. I ran 2 tests on my site-- the first came back about 30 minutes later, and the second a few hours. I was stunned by the results. When the tests were complete I received emails with a link to a video of a stranger using, and commenting on, my site. In the first video the tester really had a hard time understanding what the site did, and offered some suggestions. I made some minor text changes, and moved a couple things around (no more than 15 minutes of work) and submitted the site again. The next tester really caught on a lot quicker and actually gave some comments about thinking the service was a good idea. Wow!

Read More|Comments (0)

Setting up a Laravel application on a Dreamhost shared hosting account

December 8, 2014

Like any other kind of website, there are tons of ways to host a Laravel application. This post outlines and provides a tutorial for getting a Laravel application up and running quickly on a Dreamhost shared hosting account.

I like Dreamhost for shared hosting because they have provided me with a fast, stable and reliable service for over 6 years and they maintain an impeccable level of customer support-- moreso than any other company that I have dealt with. They also give you hosting for an unlimited number of domains, give you unlimited data storage, provide reasonably priced domain registrations with free whois anonymity, and have an admin panel with a user interface that in my mind is even easier to use than the standard shared hosting cpanel.

This post does not cover dedicated or VPS hosting solutions (although most of it does also apply to Dreamhost's VPS hosting). For dedicated hosting I use Digital Ocean and Laravel Forge-- also both incredible services. In a later post I will go over how to use these services to host a Laravel application.

Read More|Comments (0)

Encrypting Laravel Eloquent Models

October 24, 2014

Suppose you have a database table with one or more private fields like a Social Security Number or Passport ID. You want your application to have access to this data but you also want to make sure that in the worst case scenario of a data breach this information remains protected and useless to an attacker. Laravel "Provides facilities for strong AES encryption via the mcrypt PHP extension". This makes things really easy to add two-way encryption to selected fields in an Eloquent model using a really simple pattern.

Read More|Comments (0)

Protecting a Javascript Single Page Application with Laravel 4

September 12, 2014

Single Page Apps (SPA) built with frameworks like Backbone.js and AngularJS are all the rage these days. They allow for a web application to have a native-like feel while running in a browser by eliminating page reloads. They also allow developers to more rapidly build complex applications for the web browser by making use of things like MVC architecture, routing, and DOM/Javascript data-binding.

To serve an SPA from your web server to a user's browser, you must place the Javascript for that app in a publicly accessible directory on your webserver. But what happens if your SPA contains proprietary intellectual property that you want to keep private? Well, there are a few things you can do.

Read More|Comments (0)

Cross Domain JSONP with jQuery

June 27, 2014

Modern browsers do not allow cross domain AJAX calls due to security restrictions, or the "Same-Origin Policy". In other words, all AJAX requests made from a webpage must be directed at a URL on the same domain as the webpage itself.

There is a way around this, namely through the fact that browsers do not enforce the Same-Origin Policy on <script> tags and through a technique called JSONP. JSONP uses normal JSON formatted data with "P"adding, or a prefix that wraps the JSON data from an AJAX request in a function call that is callable by the originating webpage.

You can read about the gory details of JSONP but the good news is that JSONP is dead simple to implement with jQuery.

Read More|Comments (0)

newer posts >

About This Site

This site was designed by We Are How.

This site is powered by Sculpin static site generator and the source is available here.

Yotta = 10^24, or 1 000 000 000 000 000 000 000 000, the largest metric prefix.


Get in touch to find out how we can help you refine your vision and implement a dynamite product that will help your business grow. Our agile product development process is thoughtfully designed to give clients ongoing feedback and visibility from project inception to completion.