Skip to content

Instantly share code, notes, and snippets.

View jongamble's full-sized avatar

Jon Gamble jongamble

View GitHub Profile
@jongamble
jongamble / mongod-start
Created November 4, 2014 16:15
Launch Mongod terminal OSX
sudo mongod --fork --logpath /data/db/mongod.log --logappend
@jongamble
jongamble / mixins-master.scss
Created July 24, 2014 19:43
Main Mixins for any project
// These variables are to denote where our breakpoints live.
// They are in EMs and these values came from (Breakpoint / 16) = em value
$four-column-max: 39.9375em;
$eight-column: 40em;
$eight-column-max: 59.9375em;
$twelve-column: 60em;
$twelve-column-max: 79.9375em;
$sixteen-column: 80em;
@jongamble
jongamble / mixin-placeholder.scss
Created July 16, 2014 14:32
Placeholder style mixin
@mixin placeholder {
&::-webkit-input-placeholder {@content}
&:-moz-placeholder {@content}
&::-moz-placeholder {@content}
&:-ms-input-placeholder {@content}
}
@jongamble
jongamble / wp-button-shortcode
Created March 26, 2014 18:26
Wordpress custom button shortcode
/*******
* Shortcode for buttons
*******/
function cta_button_func( $atts, $content = null ) {
extract( shortcode_atts( array(
'href' => 'http://10.6.11.245/barrettlawoffices.com/',
'size' => 'text',
), $atts ) );
@jongamble
jongamble / placeholder.sublime-snippet
Created January 8, 2014 16:23
Sublime Placeholder Text Snippet
<snippet>
<content><![CDATA[
::-webkit-input-placeholder {color: ${1:hex-value} }
:-moz-placeholder {color: ${1:hex-value} }
::-moz-placeholder {color: ${1:hex-value} }
:-ms-input-placeholder {color: ${1:hex-value} }
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>placeholder</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@jongamble
jongamble / flickering-text-fix
Created November 20, 2013 14:47
Fix flickering text that happens with bxSlider occasionally.
-webkit-backface-visibility: hidden;
@jongamble
jongamble / con_form.php
Created July 3, 2013 13:09
This is a basic contact form to build off of.
<?php //Let's Contact Form This Thing UP!
// Start Your PHP Sessions
session_start();
// Set the contact page variable for redirection later
$contact_page = get_permalink(48);
// Create the necessary variable that will be used in detecting errors
$errorFound = false;
@jongamble
jongamble / isRussian
Last active December 19, 2015 02:38
An email filter that uses RegEx to check for cyrillic characters
function isRussian($val){
$result = preg_match('/[А-Яа-яЁё]/u', $val);
return $result;
}
@jongamble
jongamble / blogIntegration.php
Created June 24, 2013 16:32
A small jquery mobile file I created to pull down the ten most recent blog posts and display them on a main index page, and subpages for each of the blog posts. Pulled it down using an RSS and jQuery.load() method.
<?php include('../library/includes/config.php'); ?>
<?php
$blogUrl = 'http://www.trimarksolutions.com/inside/feed/';
$blogData = simplexml_load_file($blogUrl);
$blogData = $blogData->channel;
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
@jongamble
jongamble / gist:5571531
Created May 13, 2013 21:06
Short jQuery Accordian
jQuery(document).ready(function($) {
var allPanels = $('.termContent').hide();
$('.termHeader').on('click', function(){
$('.termContent.active').removeClass('active').hide(400);
$(this).siblings('.termContent').not('.active').slideToggle().addClass('active');
});
});