This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Button Hollow White --> | |
<a href="#" class="btn-hollow-white" style="padding: 15px 25px;line-height: 20px;">Text goes here</a> | |
<!-- Button Hollow Red --> | |
<a href="#" class="btn-hollow-red" style="width: auto; padding: 0;padding: 15px 25px;line-height: 20px;">Text goes here</a> | |
<!-- Take Action --> | |
<a href="#" class="btn-take-action" style=" padding: 15px 25px; line-height: 20px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 600;">Text goes here</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action('pre_get_posts', function ($query) { | |
global $wp; | |
if (!is_admin() && $query->is_main_query()) : | |
if ($wp->request == '.custom-hidden-endpoint-wordpress-way-is-a-death-trap') { | |
header('Content-Type: application/json'); | |
echo json_encode(array('hi' => 'mathias')); | |
exit; | |
endif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GoogleApi.geocodeAddress(vm.formData.address) | |
.success(function(data) { | |
// vm.processing = false; | |
if (data.status == 'ZERO_RESULTS') { | |
// Show Message | |
console.log('not good to goo'); | |
} else if (data.status == 'OK' && data.results.length > 1) { | |
// Show message | |
console.log('too many results'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Add to Functions.php */ | |
function grab_title() { | |
if (is_page() || is_single()) | |
{ | |
return get_the_title(); | |
} | |
elseif (is_archive() && !is_category() && !is_tag() && !is_author() && !is_tax()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style>body.fancy main { background-image: url('http://example.com/my-image.jpg') !important; </style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$projects = array(); | |
$loop = new WP_Query(array('post_type' => array('work'), 'posts_per_page' => -1, 'order' => 'ASC')); | |
$i = 1; | |
$current = FALSE; | |
$current_post_id = $post->ID; | |
while ($loop->have_posts()) : $loop->the_post(); | |
$projects[$i]['title'] = get_field('grid_title'); | |
$projects[$i]['url'] = get_permalink(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure("2") do |config| | |
config.vm.box = "mynewbox" | |
config.vm.network "private_network", ip: "192.168.33.10" | |
config.vm.hostname = "mynewbox" | |
config.vm.synced_folder ".", "/var/www", :mount_options => ["dmode=777", "fmode=666"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo dd if=/dev/zero of=/EMPTY bs=1M | |
sudo rm -f /EMPTY | |
cat /dev/null > ~/.bash_history && history -c && exit | |
vagrant package --output scotch.box | |
vagrant box add ubuntu64 package.box | |
vagrant init ubuntu64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Compressed from https://developer.mozilla.org/en-US/docs/Web/API/document.cookie | |
var docCookies={getItem:function(e){if(!e){return null}return decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*"+encodeURIComponent(e).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*([^;]*).*$)|^.*$"),"$1"))||null},setItem:function(e,t,n,r,i,s){if(!e||/^(?:expires|max\-age|path|domain|secure)$/i.test(e)){return false}var o="";if(n){switch(n.constructor){case Number:o=n===Infinity?"; expires=Fri, 31 Dec 9999 23:59:59 GMT":"; max-age="+n;break;case String:o="; expires="+n;break;case Date:o="; expires="+n.toUTCString();break}}document.cookie=encodeURIComponent(e)+"="+encodeURIComponent(t)+o+(i?"; domain="+i:"")+(r?"; path="+r:"")+(s?"; secure":"");return true},removeItem:function(e,t,n){if(!this.hasItem(e)){return false}document.cookie=encodeURIComponent(e)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT"+(n?"; domain="+n:"")+(t?"; path="+t:"");return true},hasItem:function(e){if(!e){return false}return(new RegExp("(?: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
fixedHeader(); | |
}); | |
$(window).scroll(function() { | |
fixedHeader(); | |
}); | |
$(window).resize(function() { |