Skip to main content

Wildcard subdomain Apache + Vagrant

Ever needed to setup a local SaaS app development server? Is your /etc/hosts file a mess? Me too!

Landrush to the rescue! Previously you’d setup dnsmasq locally to handle this on your physical machine, but if you’re in Vagrant you need to point to the IP of the virtual machine via Vagrant so it gets messy. Landrush is a magical piece of software that handles setting up a daemon in your Vagrant machine that solves this across the board.

Simply install the vagrant plugin locally:

Next, setup your Vagrantfile to properly set the hostname and the daemon to list on *.{hostname}

Convert Bash script to Ansible Playbook

A simple bash script to provision a virtual host for a wordpress site, called within a Vagrant build.

Converting (and expanding) this to a playbook:

And finally, the call in Vagrant:

 

Custom angular smart-table pagination template

Short and sweet. Implemented smart-table on a new project, and needed to customize the pagination template. This is simply an override of the default found in smart-table.js