Skip to content

Instantly share code, notes, and snippets.

View justinwhall's full-sized avatar

Justin W Hall justinwhall

View GitHub Profile
// 1. $ wp scaffold plugin-tests myplugin
// 2. bash bin/install-wp-tests.sh wordpress_test root root localhost latest (on plugin directory. Terminal results:)
root@b96f5ad58969:/app/public/wp-content/plugins/myplugin# bash bin/install-wp-tests.sh wordpress_test root root localhost latest
2017-06-03 00:24:13 URL:http://api.wordpress.org/core/version-check/1.7/ [568] -> "/tmp/wp-latest.json" [1]
+ install_wp
+ '[' -d /tmp/wordpress/ ']'
+ return
+ install_test_suite
@justinwhall
justinwhall / .gitignore
Created March 24, 2017 01:22
WP Engine gitignore
*~
.DS_Store
.svn
.cvs
*.bak
*.swp
Thumbs.db
wp-content/plugins
[windsor_strava_athlete_profile]
athleteid (required) // The athlete's Strava ID
values: // athletes Strava ID
default:0
followers // Show athlete's followers?
values: 0 or 1
default:1
// dependancies
var gulp = require('gulp');
var less = require('gulp-less');
var path = require('path');
var rename = require("gulp-rename");
var eventStream = require('event-stream');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var sourcemaps = require('gulp-sourcemaps');
var plumber = require('gulp-plumber');
#header.info{display: none !important;}
@justinwhall
justinwhall / plugin.js
Created February 1, 2013 20:41
jQuery || Plugin Boilerplate
(function($){
var MyPlugin = function(element, options)
{
var elem = $(element);
var obj = this;
var settings = $.extend({
param: 'defaultValue'
}, options || {});
// Public method - can be called from client code
@justinwhall
justinwhall / jq-bg-slider.js
Created January 8, 2013 20:50
jQuery | BG image slider
jQuery(document).ready(function() {
//jQuery('#banner').after('<div id="static-slide"></div>');
var imgArr = new Array('/thedentalsitecontent/themes/176/images/slider-1.png', '/thedentalsitecontent/themes/176/images/slider-2.png', '/thedentalsitecontent/themes/176/images/slider-3.png', '/thedentalsitecontent/themes/176/images/slider-4.png', '/thedentalsitecontent/themes/176/images/slider-5.png', '/thedentalsitecontent/themes/176/images/slider-6.png', '/thedentalsitecontent/themes/176/images/slider-7.png');
var preloadArr = new Array();
var i;
for(i = 0; i < imgArr.length; i++) {
preloadArr[i] = new Image();
preloadArr[i].src = imgArr[i];
}
var currImg = 2;
@justinwhall
justinwhall / gist:3709739
Created September 12, 2012 20:39
Current Server Time
<script type="text/javascript">
// Current Server Time script (SSI or PHP)- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use.
//Depending on whether your page supports SSI (.shtml) or PHP (.php), UNCOMMENT the line below your page supports and COMMENT the one it does not:
//Default is that SSI method is uncommented, and PHP is commented:
var currenttime = '<!--#config timefmt="%B %d, %Y %H:%M:%S"--><!--#echo var="DATE_LOCAL" -->' //SSI method of getting server date
@justinwhall
justinwhall / media-query-template.css
Created September 1, 2012 00:29
CSS | Media Query Template
/* Xlarge screens ----------- */
@media only screen and (max-width : 1260px) {
.container{
width:1024px;
}
}
/* Desktops and laptops ----------- */
@media only screen and (max-width : 1024px) {
.container{
@justinwhall
justinwhall / eventUtility.js
Created July 17, 2012 19:35
JS | Cross Browsers Event Utility Object
var eventUtility = {
addEvent : function(el, type, fn) {
if (typeof addEventListener !== "undefined") {
el.addEventListener(type, fn, false);
} else if (typeof attachEvent !== "undefined") {
el.attachEvent("on" + type, fn);
} else {
el["on" + type] = fn;
}
},