Skip to content

Instantly share code, notes, and snippets.

View tomcat.conf
description "Tomcat Server"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
respawn limit 10 5
setuid tomcat
setgid tomcat
View keybase.md

Keybase proof

I hereby claim:

  • I am jdcauley on github.
  • I am jdcauley (https://keybase.io/jdcauley) on keybase.
  • I have a public key ASAfS448VJzN7T8CN2hk278KXDVvGDsiiEmadqL7mfUzyAo

To claim this, I am signing this object:

View user.js
process.env.NODE_ENV = 'test';
//Require the dev-dependencies
let chai = require('chai')
let chaiHttp = require('chai-http')
let server = require('../index.js')
let should = chai.should()
let faker = require('faker')
const Models = require('../db.js')
@jdcauley
jdcauley / user.js
Created Oct 9, 2017
Trying to figure out testing writing
View user.js
process.env.NODE_ENV = 'test';
//Require the dev-dependencies
let chai = require('chai')
let chaiHttp = require('chai-http')
let server = require('../index.js')
let should = chai.should()
let faker = require('faker')
const Models = require('../db.js')
View gist:9acefa4860faab09acfa946209446ce9
"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(e,t){"object"==("undefined"==typeof exports?"undefined":_typeof(exports))&&"object"==("undefined"==typeof module?"undefined":_typeof(module))?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==("undefined"==typeof exports?"undefined":_typeof(exports))?exports.Cleave=t():e.Cleave=t()}(void 0,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){(function(t){var n=function e(t,r){var n=this;if(n.element="string"==typeof t?document.querySelector(t):void 0!==t.length&&t.length>0?t[0]:t,!n.element)throw new Error("[cleave.js] Please check the element");r.initValue=n.element.val
View gist:0cb24916e293f818aa82aca6eee3fb13
/*!
* cleave.js - 0.7.16
* https://github.com/nosir/cleave.js
* Apache License Version 2.0
*
* Copyright (C) 2012-2017 Max Huang https://github.com/nosir/
*/
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Cleave=t():e.Cleave=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={exports:{},id:n,loaded:!1};return e[n].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){(function(t){"use strict";var n=function(e,t){var r=this;if("string"==typeof e?r.element=document.querySelector(e):r.element="undefined"!=typeof e.length&&e.length>0?e[0]:e,!r.element)throw new Error("[cleave.js] Please check the element");t.initValue=r.element.value,r.properties=n.DefaultProperties.assign({},t),r.init()};n.prototype={init:function(){var e=this,t=e.properties;(t.numeral||t.phone||t.creditCard||t.date||0!==t.b
@jdcauley
jdcauley / index.php
Created Mar 16, 2017
return function
View index.php
function random_color(){
return 'purple';
}
$color = random_color();
random_color();
@jdcauley
jdcauley / Contract Killer 3.md
Created Dec 19, 2016 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

View fields.php
function sponsor_fields(){
$sponsor_id = '';
if( isset( $_GET['post'] ) ){
$sponsor_id = get_post_meta( $_GET['post'], '_os_sponsor_id', true );
} else if( isset( $_GET['taxonomy'] ) ){
$sponsor_id = get_term_meta( $_GET['tag_ID'], '_os_sponsor_id', true );
} else {
return;
@jdcauley
jdcauley / array.js
Created Sep 28, 2016
what the crap
View array.js
driverInputs.each(function(i){
var data = $(this).getParams();
app.data.drivers.push(data);
if(!app.saved['drivers']){
app.saved['drivers'] = [];
}
var newCopy = app.model.driver.slice(0);
console.log(newCopy);