Skip to content

Instantly share code, notes, and snippets.

/Users/jordancauley/projects/group/api/controllers/MainController.js:9
exec("git reset --hard HEAD && git pull origin
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
destroyMembersSubjectLine: function(data, cb){
console.log('destroy members');
// Get Addresses from Body
var destroyText = data.bodyText;
var bodyAddresses = [];
parser.addRule(/([A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]+)/gi, function(tag) {
var cleanTag = tag;
@jdcauley
jdcauley / blockquotes.js
Created May 30, 2014 16:47
Format Blockquotes
$(function quotes() {
blockquotes = document.getElementsByTagName('blockquote');
if (blockquotes) {
for (var i = 0; i < blockquotes.length; i++){
var blockquote = blockquotes[i];
var currentId = 'block-' + i;
blockquote.id = currentId;
paragraphs = blockquote.getElementsByTagName('p');
if ( 1 < paragraphs.length ){
var citation = document.getElementById(currentId);
@jdcauley
jdcauley / carousel.php
Last active August 29, 2015 14:02
Better BS + WP Carousel
@jdcauley
jdcauley / carousel-fade.css
Created June 19, 2014 18:17
Bootstrap Carousel Fade
@jdcauley
jdcauley / loop.js
Created July 8, 2014 12:46
jQuery Text Loop
$(function() {
var headline = $("#headline");
var copy = ['Entrepreneurs', 'Innovators', 'Industrialists', 'Disruptors'];
var position = -1;
!function loop() {
position = (position + 1) % copy.length;
headline.html(copy[position])
.fadeIn(1000)
.delay(3000)
@jdcauley
jdcauley / postloop.php
Created July 8, 2014 19:45
Recent Post Loop
<?php $the_query = new WP_Query('showposts=3'); ?>
<?php if ( $the_query->have_posts() ) : ?>
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
<div class="recent-post-wrapper">
<?php if (has_post_thumbnail()): ?>
<div class="recent-post-img">
<?php the_post_thumbnail('', array('class' => 'img-responsive')); ?>
</div>
<div class="recent-post-copy">
<h4><?php the_title(); ?></h4>
@jdcauley
jdcauley / email-sign-up.js
Created July 10, 2014 13:35
Email Sign Up with Parse
$('#submit').click(function(){
var emailAddress = $('#email').val();
var NewSignUp = Parse.Object.extend("NewSignUp");
var newSignUp = new NewSignUp();
newSignUp.save({email: emailAddress}).then(function(success) {
if(success){
$('#signup').addClass('done');
$('#form-success').addClass('show');
} else {
$('#signup').addClass('done');
@jdcauley
jdcauley / boxer.js
Last active August 29, 2015 14:03
Boxer - Make Height = Width
window.onload = boxer;
window.onresize = boxer;
function boxer(){
var cols = document.getElementsByClassName('col');
for (var i = 0; i < cols.length; i++){
var style = window.getComputedStyle(cols[i], null).getPropertyValue('width');
cols[i].style.height=style;
}
@jdcauley
jdcauley / scripts.js
Created July 15, 2014 16:00
Placeholder for Gravity Forms
function placeholder(){
var target = '#gform_1 input[type=text]';
var inputs = document.querySelectorAll(target);
if(inputs){
for (var i = 0; i < inputs.length; i++){
var value = inputs[i].value;
console.log(value);