Skip to content

Instantly share code, notes, and snippets.

View wmeredith's full-sized avatar

Wade Meredith wmeredith

View GitHub Profile
@wmeredith
wmeredith / acf-states-provinces.txt
Created September 27, 2018 14:56
List of US States and Canadian Provinces for use with the Advanced Custom Fields Wordpress Plugin
AB : Alberta
AK : Alaska
AL : Alabama
AR : Arkansas
AZ : Arizona
BC : British Columbia
CA : California
CO : Colorado
CT : Connecticut
DC : District of Columbia
@wmeredith
wmeredith / acf-states.txt
Last active September 27, 2018 14:56
List of US States for use with the Advanced Custom Fields Wordpress Plugin
AL : Alabama
AK : Alaska
AZ : Arizona
AR : Arkansas
CA : California
CO : Colorado
CT : Connecticut
DE : Delaware
DC : District of Columbia
FL : Florida
@wmeredith
wmeredith / _arrow.scss
Last active May 6, 2016 15:57 — forked from kieranmv95/_arrow.scss
Create pure CSS triangles in a matter of seconds with this scss mixin
@mixin arrow($settings){
$arrow-direction: map-get($settings, direction);
$arrow-color: map-get($settings, color);
$arrow-size: map-get($settings, size);
width: 0;
height: 0;
display: inline-block;
@if ($arrow-direction == down){
@wmeredith
wmeredith / 5 Column Layout for Bootstrap 3
Created November 19, 2015 23:02
5 Column Layout for Bootstrap 3 Using Less
.col-xs-5ths,
.col-sm-5ths,
.col-md-5ths,
.col-lg-5ths {
position: relative;
min-height: 1px;
padding-right: $grid-gutter-width/2;
padding-left: $grid-gutter-width/2;
}
@wmeredith
wmeredith / gist:4d0f932334a641f4c797
Last active November 13, 2015 15:41
Center an element with jquery
$('#element').ready(function() {
$(this).css({
'position' : 'absolute',
'left' : '50%',
'top' : '50%',
'margin-left' : -$('#element').outerWidth()/2,
'margin-top' : -$('#element').outerHeight()/2
});
});
font-family: -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
@wmeredith
wmeredith / Bootstrap Panel Collapse
Created September 11, 2015 22:31
A quick button for collapsing bootstrap panel-body and panel-footer from the panel-heading.
$('.bootstrapPanelCollapse').click(function() {
var $pBody = $(this).closest('.panel').find('.panel-body');
var $pFooter = $(this).closest('.panel').find('.panel-footer');
$.merge($pBody,$pFooter).slideToggle();
$(this).find('.glyphicon').toggleClass('glyphicon-chevron-down');
$(this).find('.glyphicon').toggleClass('glyphicon-chevron-up');
});
<label for="timeZone">Select Timezone</label>
<select id="timeZone">
<?php
function timezone_list() {
static $timezones = null;
if ($timezones === null) {
$timezones = [];
$offsets = [];
$now = new DateTime();
@wmeredith
wmeredith / gist:08a29e9ba9cae5d86483
Created July 14, 2014 04:08
Recursively Combine Arrays in jquery
recursiveSearch = function (text, depth ) {
var a = [ ['1','2','3'], ['a','b','c'] ];
var results = [""]; // start with the empty string,
for (var i=0; i<a.length; i++) { // and repeatedly
var ai = a[i],
l = ai.length;
results = $.map(results, function(r) { // make result a new array of
var ns = []; // new combinations of
for (var j=0; j<l; j++) // each of the letters in ai
<!-- iPhone 3 SPLASHSCREEN-->
<link href="<?php bloginfo('template_directory'); ?>/_images/apple-touch-startup-image-320x460.png" media="(device-width: 320px)" rel="apple-touch-startup-image">
<!-- iPhone 4 SPLASHSCREEN-->
<link href="<?php bloginfo('template_directory'); ?>/_images/apple-touch-startup-image-640x920.png" media="(device-width: 320px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<!-- iPhone 5 SPLASHSCREEN-->
<link href="<?php bloginfo('template_directory'); ?>/_images/apple-touch-startup-image-640x1096.png" media="(device-width: 320px) and (-webkit-device-pixel-ratio: 2)" rel="apple-touch-startup-image">
<!-- iPad (portrait) SPLASHSCREEN-->
<link href="<?php bloginfo('template_directory'); ?>/_images/apple-touch-startup-image-768x1004.png" media="(device-width: 768px) and (orientation: portrait)" rel="apple-touch-startup-image">
<!-- iPad (landscape) SPLASHSCREEN-->
<link href="<?php bloginfo('template_directory'); ?>/_images/apple-touch-startup-image-748x1024