Skip to content

Instantly share code, notes, and snippets.

View ckhicks's full-sized avatar
🕵️‍♂️
Consulting Detective

CK Hicks ckhicks

🕵️‍♂️
Consulting Detective
View GitHub Profile
!function (e) { function t(i) { if (n[i]) return n[i].exports; var r = n[i] = { exports: {}, id: i, loaded: !1 }; return e[i].call(r.exports, r, r.exports, t), r.loaded = !0, r.exports } var n = {}; return t.m = e, t.c = n, t.p = "", t(0) }([function (e, t, n) { var i = n(1)(), r ="https://rawgit.com/lowlines/three-tgx-loader/master/three.tgxloader.js";if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");var a={};window.DESTINYMODELCONFIG&&(a=window.DESTINYMODELCONFIG),a.apiKey||(a.apiKey=""),AFRAME.registerComponent("destiny-model",{schema:{itemHash:{type:"number"},shaderHash:{type:"number",default:0},game:{type:"string",default:"destiny2"},apiKey:{type:"string",default:a.apiKey},platform:{type:"string",default:"mobile"},d1Manifest:{type:"string",default:a.d1Manifest},d2Manifest:{type:"string",default:a.d2Manifest}},multiple:!1,init:function(){this.model=null,this.loader=null,this.loaderPromise=o().then(function(){this.loader=new THREE.TGXLoader}.bind(
@ckhicks
ckhicks / jquery-date-val.js
Last active August 29, 2015 14:21
A quick and easy way to validate date inputs against future dates.
function dateValidation () {
$('#input_1_6').on('blur', function (e) {
var $field = $(this),
inputVal = $field.val().split('/'),
ddVal = inputVal[1],
mmVal = inputVal[0],
yyVal = inputVal[2],
today = new Date(),
@ckhicks
ckhicks / acf_modules.php
Created March 26, 2015 16:58
Include this somewhere in your theme and enjoy the simplicity of included matching field/file names!
<?php
/**
* ACF Modules for Pages
*
*/
// check to see if we overrode the parent page ID
if ( !isset($parent_id) ) :
$parent_id = get_the_ID();
endif;
@ckhicks
ckhicks / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ckhicks
ckhicks / gist:a1f5b586adeecac3dcab
Created March 4, 2015 20:49
Simple CAPTCHA for CF7
// CF7 validation
if ( $('.wpcf7-form').length > 0 ) {
// for each form on the page...
$('.wpcf7-form').each(function () {
var $form = $(this),
action = $form.attr('action'),
$field = $form.find('.bot-check');
// remove the action from the form by default
@ckhicks
ckhicks / rbenv
Last active August 29, 2015 14:04
$ bundler -v
Bundler version 1.6.3
$ rbenv global
2.1.0
$ ruby -v
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]
$ bundle
Your Ruby version is 2.0.0, but your Gemfile specified 2.1.0