Skip to content

Instantly share code, notes, and snippets.

Wade Meredith wmeredith

Block or report user

Report or block wmeredith

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@wmeredith
wmeredith / acf-states-provinces.txt
Created Sep 27, 2018
List of US States and Canadian Provinces for use with the Advanced Custom Fields Wordpress Plugin
View acf-states-provinces.txt
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 Sep 27, 2018
List of US States for use with the Advanced Custom Fields Wordpress Plugin
View acf-states.txt
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 — forked from kieranmv95/_arrow.scss
Create pure CSS triangles in a matter of seconds with this scss mixin
View _arrow.scss
@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 Nov 19, 2015
5 Column Layout for Bootstrap 3 Using Less
View 5 Column Layout for Bootstrap 3
.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 Nov 13, 2015
Center an element with jquery
View gist:4d0f932334a641f4c797
$('#element').ready(function() {
$(this).css({
'position' : 'absolute',
'left' : '50%',
'top' : '50%',
'margin-left' : -$('#element').outerWidth()/2,
'margin-top' : -$('#element').outerHeight()/2
});
});
View CSS Font Stack for Using System Fonts
font-family: -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
@wmeredith
wmeredith / Bootstrap Panel Collapse
Created Sep 11, 2015
A quick button for collapsing bootstrap panel-body and panel-footer from the panel-heading.
View Bootstrap Panel Collapse
$('.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');
});
View Create HTML Select Element for Timezones
<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 Jul 14, 2014
Recursively Combine Arrays in jquery
View gist:08a29e9ba9cae5d86483
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
View Mobile Safari Web App Splash Screen Meta
<!-- 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
You can’t perform that action at this time.