Skip to content

Instantly share code, notes, and snippets.

View michaelbunch's full-sized avatar

Michael Bunch michaelbunch

View GitHub Profile
@michaelbunch
michaelbunch / Ubuntu DevEnv Setup
Last active August 29, 2015 13:56
Ubuntu 13.10 setup commands for install a fresh LAMP development environment.
#!/bin/bash
APTOPTIONS="-y"
MYSQLPASS="nopass"
echo "--------------------------------------------"
echo " Ubuntu Development Environment Bootstraper "
echo "--------------------------------------------"
echo "-> Preparing APT and Updating Ubuntu ..."
@michaelbunch
michaelbunch / Apache 2.4 Virtual Host Example
Last active August 29, 2015 13:56
Apache 2.4 Virtual Host Example
<VirtualHost sitename.dev:80>
DocumentRoot /var/www/sitename.dev
ServerName <sitename.dev>
ServerAdmin <admin@sitename.dev>
ErrorLog /var/logs/apache2/sitename.dev-error_log
<Directory "/var/www/sitename.dev">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
#!/bin/bash
sudo apt-get install ruby ruby-dev rubygems
sudo gem install berkshelf
#!/bin/bash
if test -z "$1"
then
echo 'Please supply an action. (add)'
exit 0
else
if [[ "$1" -ne "add" ]] || [[ $1 -ne "scaffold" ]]; then
echo 'Please supply a valid action. [add]'
exit 0
@michaelbunch
michaelbunch / Apache VirtualHost Builder for OSX
Last active August 29, 2015 14:02
Apache VirtualHost Builder for OSX
#!/bin/bash
# ---------------------------------------------------------------
# Apache VirtualHost Builder for OSX
#
# This script tries to make it easier to add Apache VirtualHosts
# to the default install of OSX. For the script to run `as-is`
# two changes must me made to Apache.
#
# 1. Create a new folder in /etc/apache2 named vhosts
@michaelbunch
michaelbunch / PHP Project Checker.xml
Last active August 29, 2015 14:02
Apache Ant build.xml file for validating PHP projects
<?xml version="1.0" encoding="UTF-8"?>
<project name="ProjectChecker" default="build" basedir=".">
<target name="build" depends="tools,testing" />
<target name="tools" depends="tools.phplint,tools.phpcs,tools.phpmd" description="Run code examination tools" />
<target name="tools.phplint" description="Check code with PHP Lint option">
<apply executable="php" failonerror="true">
@michaelbunch
michaelbunch / Purge PHPStorm 7.x Settings on OSX
Last active August 29, 2015 14:03
Purge PHPStorm 7.x Settings on OSX
#!/bin/bash
# The follwing commands will wipe out any and all traces, except the
# installed application, of PHPStorm support files. Only use these if
# you need to reset back to a fresh install.
rm -rf ~/Library/Application\ Support/WebIde70
rm -rf ~/Library/Cache/WebIde70
rm -rf ~/Library/Preferences/WebIde70
@michaelbunch
michaelbunch / behat.yml
Last active October 4, 2015 05:35
Laravel 5 Project Starter
default:
autoload:
'': %paths.base%/tests/features/bootstrap
extensions:
Behat\MinkExtension:
base_url: http://<project>.app
goutte: ~
selenium2: ~
suites:
auth_suite:
@michaelbunch
michaelbunch / Vagrantfile
Last active December 11, 2015 16:33
Install latest Docker and tools on Ubuntu Trusty
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.hostname = "pwap"
config.vm.network "private_network", ip: "192.168.10.10"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
@michaelbunch
michaelbunch / docker-compose.yml
Last active September 12, 2018 15:52
Docker-compose for local Laravel development
version: '2'
services:
app:
image: learninghouse/nginx-phpfpm:7.1
volumes:
- ./:/app
ports:
- "8000:80"
links: