Skip to content

Instantly share code, notes, and snippets.

View drawcard's full-sized avatar
👍

Drawcard drawcard

👍
  • Drawcard
  • Australia
View GitHub Profile
@drawcard
drawcard / Environment Setup.md
Last active September 11, 2017 00:28
Development Environment using a VM + VMWare Fusion

Installation

  • Download the Ubuntu Server ISO: http://www.ubuntu.com/download/server
  • Create a new container and install Ubuntu Server Don't use the Setup Wizard to do this, instead mount the ISO and use Ubuntu's setup process During the install process, also add the LAMP + OpenSSH + Samba modules when asked

(Mac) Create an Applescript to run VM as a headless server

More info: http://www.artandlogic.com/blog/2013/10/running-vmware-fusion-6-headless/

  • Open AppleScript and make a new script with the following code:
@drawcard
drawcard / wordpress-deployment.md
Last active August 29, 2015 14:08
Wordpress Deployment

Setup:

  • Local server: VM machine runnning Ubuntu
  • Staging server: Remote server
  • Production server: Another remote server

Initial Setup

# Clone Wordpress
@drawcard
drawcard / Vagrant + Web Dev.md
Last active August 29, 2015 14:14
Vagrant + Web Dev

Setting up Vagrant

Vagrant allows you to quickly set up a headless VM environment (eg. Ubuntu Server + LAMP) on a local machine within Virtualbox (just type vagrant init + vagrant up and you'll have a new VM with SSH running in about 10 minutes). There are several advantages over traditional VM containers, or XAMPP / MAMP / other LAMP sandboxes:

  • All of your customised VM settings are stored in a config file ./Vagrantfile which can be shared with anyone to recreate your environment
  • You can easily nuke the environment if something goes wrong (vagrant destroy) and reinitialise a fresh enviroment exactly as you like it, in a matter of minutes - backup your DB's first of course!
  • Choose a web hosting provider running Vagrant and you can instantly set up your local working environment remotely (or vice versa).

More at http://www.vagrant.com/

Setup

@drawcard
drawcard / Wordpress Deploy Process.md
Last active August 29, 2015 14:14
Wordpress Deploy Process
  • Setup and use WP-CLI
  • Add the following to wp-config.php:
/* https://github.com/roots/roots-sass */
define('WP_ENV', 'development');

//Allow upload of all file types: http://pixert.com/blog/wordpress-file-type-permitted-security-reasons/
define('ALLOW_UNFILTERED_UPLOADS', true);
@drawcard
drawcard / Roots Sage 8.0 Setup Process.md
Last active August 29, 2015 14:14
Roots / Sage 8.0 Setup Process

Legend

Local Server = local.dev

Staging Server = staging.xxxxxx.com

Production Server = xxxxxx.com

1. Fetch the Roots template files

{
"name": "sage",
"homepage": "http://roots.io/sage/",
"authors": [
"Ben Word <ben@benword.com>"
],
"license": "MIT",
"private": true,
"dependencies": {
"modernizr": "~2.8.3",
{
"name": "sage",
"homepage": "http://roots.io/sage/",
"authors": [
"Ben Word <ben@benword.com>"
],
"license": "MIT",
"private": true,
"dependencies": {
"modernizr": "~2.8.3",
@drawcard
drawcard / the stuff that matters.md
Last active June 13, 2016 08:31
The stuff that matters.

Here's a list of setup stuff you need to do after firing up that fresh new Ubuntu Vagrant VM...


NOTE to everyone, this gist is just something written for my situation and some of the stuff may be irrelevant, useless, or might break stuff for you!

First time server setup & security

@drawcard
drawcard / NPM Warnings & Errors.md
Created February 14, 2015 14:52
NPM Warnings & Errors
14:13 $ npm install
 
> ws@0.5.0 install /var/www/clients/drawcard.com.au/wp-content/themes/theme-build-20140215/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)

make: Entering directory `/var/www/clients/drawcard.com.au/wp-content/themes/theme-build-20140215/node_modules/browser-sync/node_modules/socket.io/node_modules/engine.io/node_modules/ws/build'
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
@drawcard
drawcard / provision.sh
Last active August 29, 2015 14:15
Bootstrap provisioning script to get useful software up and running on VMs
#!/usr/bin/env bash
bold='tput bold'
normal='tput sgr0'
# Configure home directory
# HOME=/home/vagrant/
HOME=~
echo '***** Check for package updates...'
sudo apt-get update