Skip to content

Instantly share code, notes, and snippets.

View nfourtythree's full-sized avatar

Nathaniel Hammond nfourtythree

View GitHub Profile
@nfourtythree
nfourtythree / CraftValetDriver.php
Last active August 4, 2016 07:07
Laravel Valet driver for Craft CMS simple with document root (no locales)
<?php
class CraftLocaleValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
@nfourtythree
nfourtythree / enable_dnsmasq_on_osx.sh
Last active May 10, 2016 11:52 — forked from r10r/enable_dnsmasq_on_osx.sh
Installs and configures dnsmasq on osx (for local resolution of development machines e.g virtualbox). Cudos to Alan Ivey http://www.echoditto.com/blog/never-touch-your-local-etchosts-file-os-x-again
# ----------------------
# installing dnsmasq and enable daemon
# ----------------------
brew install dnsmasq
sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons
# ----------------------
# adding resolver for dev domain
# ----------------------
[ -d /etc/resolver ] || sudo mkdir -v /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/dev'