Skip to content

Instantly share code, notes, and snippets.

View drawcard's full-sized avatar
👍

Drawcard drawcard

👍
  • Drawcard
  • Australia
View GitHub Profile
@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 / 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
@drawcard
drawcard / 20150228 - Unhandled Exception Error.md
Created February 28, 2015 01:54
20150228 - Unhandled Exception Error
✔ /var/www/clients/websitename.com.au/wp-content/themes/build [dev L|✚ 1] 
01:05 $ npm cache clean
✔ /var/www/clients/websitename.com.au/wp-content/themes/build [dev L|✚ 1] 
01:25 $ rm -rf node_modules/
✔ /var/www/clients/websitename.com.au/wp-content/themes/build [dev L|✚ 1] 
01:26 $ npm install
npm WARN engineStrict Per-package engineStrict (found in package.json for gulp-concat)
npm WARN engineStrict won't be used in npm 3+. Use the config setting `engine-strict` instead.
npm WARN engineStrict Per-package engineStrict (found in package.json for gulp)
@drawcard
drawcard / new-mac-setup.md
Last active August 29, 2015 14:22
New Macbook Pro - Setup and Install Process