Skip to content

Instantly share code, notes, and snippets.

@TrevorMW
TrevorMW / stepSelects.js
Created September 13, 2017 22:46
Step Selects within a form
;(function($,window,undefined)
{
var stepSelects = function(form){
this.form;
this.optionIndex = 1;
this.selects = [];
this.init(form);
return this;
};
@TrevorMW
TrevorMW / LAMPServerConfig.sh
Last active March 7, 2016 01:20
LAMP server config
sudo apt-get update
sudo apt-get upgrade
sudo apt-get --yes --force-yes install htop apache2 php5 libapache2-mod-php5 mysql-server php5-mysql php5-fpm php5-cli php5-curl php5-gd php5-imagick git ufw fail2ban zip mytop
sudo /usr/bin/mysql_secure_installation
@TrevorMW
TrevorMW / gist:9193790
Created February 24, 2014 18:19
Global .gitignore file
# VIM
.*.swo
.*.swp
tags
# NetBeans
nbproject
# CVS
CVS
@TrevorMW
TrevorMW / aspx to WP redirect action
Created February 21, 2014 16:23
redirect action for incoming .apsx requests on the same domain. Redirects URLs based on key => value array, and trys to match them if no key exists
// Action to initiate the bk_process_redirects() function BEFORE the template heirarchy redirects anywhere else.
add_action('template_redirect', 'bk_process_redirects');
// Intercepts an .aspx path and redirects to associated URL in array
// If no Key => Value pair is found for the incoming request, the .aspx extension is removed, and the URL path is allowed to
// continue. To see if wordpress can instinctively find a corresponding page. If none of these options work, the user goes to * * 404 page.
function bk_process_redirects(){
@TrevorMW
TrevorMW / composer.json
Last active August 29, 2015 13:55
WP Starter composer.json file
{
"require": {
"wordpress/core": "*",
"wordpress/advanced-custom-fields":"*",
"wordpress/types":"*",
"wordpress/ssh-sftp-updater-support":"*"
},
"repositories": [
{
"type": "composer",