Skip to content

Instantly share code, notes, and snippets.

View csymlstd's full-sized avatar

Casey Milstead csymlstd

View GitHub Profile
@csymlstd
csymlstd / states-select.html
Created August 4, 2016 19:26 — forked from trent-boyd/states-select.html
HTML: US States in Select Element
<!-- Full State Name -->
<select name="State">
<option value="AL">Alabama</option>
<option value="AK">Alaska</option>
<option value="AZ">Arizona</option>
<option value="AR">Arkansas</option>
<option value="CA">California</option>
<option value="CO">Colorado</option>
<option value="CT">Connecticut</option>
r(function() {
});
function r(f){/in/.test(document.readyState)?setTimeout('r('+f+')',9):f()}
@csymlstd
csymlstd / wp-menu-wrapper.php
Created October 14, 2016 21:16
Custom UL wrapper for menu, add attributes without walker
<?php
$args = array (
'theme_location' => 'primary',
'container' => '',
'container_class'=> '',
'menu_class' => 'mobile-menu',
'items_wrap' => '<ul class="menu" data-accordion-menu>%3$s</ul>'
);
wp_nav_menu( $args );
?>
@csymlstd
csymlstd / gist:b340921e517e92c65a0b8113d2f174fc
Created November 22, 2016 18:00
Foundation 6 data-toggler iPhone Fix
$('[data-toggle]').on('click', function() {
$(document).trigger('click.zf.trigger', '[data-toggle]');
});
@csymlstd
csymlstd / gist:fc532ab8da3edc83de4059202da7c118
Created January 11, 2017 16:40
wp-post-featured-image.php
<?php $featured = wp_get_attachment_url(get_post_thumbnail_id($post->ID)); ?>
@csymlstd
csymlstd / copyssh
Last active February 15, 2017 15:11
copy ssh key to clipboard
pbcopy < ~/.ssh/id_rsa.pub
@csymlstd
csymlstd / gmaps.html
Last active May 22, 2017 15:42
Google Maps API
<script>
var map;
function initMap() {
var myLatLng = {lat: 32.811879, lng: -96.805032};
map = new google.maps.Map(document.getElementById('map'), {
center: myLatLng,
scrollwheel: false,
streetViewControl: false,
mapTypeControl: false,
zoom: 16,
@csymlstd
csymlstd / gist:1afcdb4597b50a9dacc008ca91f8b7d5
Last active December 5, 2017 16:05
Gravity Forms Pre Send
function modify_recipients($email, $message_format, $notification, $entry) {
wp_remote_post('https://requestb.in/1cyx8ej1', array(
'body' => array(
'email' => $email,
'test' => 'test',
'format' => $message_format,
'notification' => $notification,
)
));
@csymlstd
csymlstd / regex.md
Created December 5, 2017 23:18 — forked from etiennemarais/regex.md
Regular expression for handlebars variables, includes, if/else blocks and unescaped variables

Regex

{{[{]?(.*?)[}]?}}

Captures the value of the variable name in a handlebars template

{{> components/templates/email/includes/email-tr-spacer }}
{{# deliveryAddress }}
#Reset the permissions of all files to 664:
find /path/to/site/ -type f -exec chmod 664 {} \;
#Reset permissions of directories to 775:
find /path/to/site/ -type d -exec chmod 775 {} \;