Skip to content

Instantly share code, notes, and snippets.

View donaldallen's full-sized avatar

Donald Allen donaldallen

View GitHub Profile
[{"id":6,"date":"2015-10-28T17:00:02","guid":{"rendered":"http:\/\/sandbox.dev\/?p=6"},"modified":"2015-10-28T17:00:02","modified_gmt":"2015-10-28T21:00:02","slug":"office-test-post","type":"post","link":"http:\/\/sandbox.dev\/office-test-post\/","title":{"rendered":"Office Test Post"},"content":{"rendered":""},"excerpt":{"rendered":""},"author":1,"featured_image":0,"comment_status":"open","ping_status":"open","sticky":false,"format":"standard","_links":{"self":[{"href":"http:\/\/sandbox.dev\/wp-json\/wp\/v2\/posts\/6"}],"collection":[{"href":"http:\/\/sandbox.dev\/wp-json\/wp\/v2\/posts"}],"author":[{"embeddable":true,"href":"http:\/\/sandbox.dev\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/sandbox.dev\/wp-json\/wp\/v2\/comments?post_id=6"}],"version-history":[{"href":"http:\/\/sandbox.dev\/wp-json\/wp\/v2\/posts\/6\/revisions"}],"http:\/\/v2.wp-api.org\/attachment":[{"embeddable":true,"href":"http:\/\/sandbox.dev\/wp-json\/wp\/v2\/media?post_parent=6"}],"http:\/\/v2.wp-api.or
var communities = new Bloodhound({
datumTokenizer: function(datum) {
return Bloodhound.tokenizers.whitespace(datum.title);
},
queryTokenizer: Bloodhound.tokenizers.whitespace,
prefetch: {
cache: false,
url: '/wp-json/wp/v2/communities',
filter: function(response) {
return $.map(response, function(community) {
@donaldallen
donaldallen / app.js
Created October 6, 2015 16:03
Dropdown function
;(function($) {
var dropdown = {
bindHandlers: function() {
$(document).on('click', function() {
$('.dropdown-wrapper').removeClass('active');
});
},
init: function(el) {
var self = this;
@donaldallen
donaldallen / SassMeister-input-HTML.html
Created June 25, 2015 20:07
Generated by SassMeister.com.
<div class="computer">
<div class="screen two"></div>
<div class="screen one"></div>
</div>
folders:
- map: ~/Work Repos/thevault.dev
to: /home/vagrant/thevault.dev
type: "nfs"
sites:
- map: thevault.dev
to: /home/vagrant/thevault.dev/public
hhvm: true
<?php
defined( 'ABSPATH' ) OR exit;
/**
* Plugin Name: (WCM) PHPMailer Exceptions & SMTP
* Description: WordPress by default returns <code>FALSE</code> instead of an <code>Exception</code>. This plugin fixes that.
*/
add_action( 'phpmailer_init', 'WCMphpmailerException' );
function WCMphpmailerException( $phpmailer )
{
@donaldallen
donaldallen / SassMeister-input-HTML.html
Created November 10, 2014 21:40
Generated by SassMeister.com.
<html>
<body>
<a href="#" class="btn">Button</a>
<section class="products">
<a href="#">
<span class="title">Product 1</span>
<span class="btn">Click Me</span>
</a>
@donaldallen
donaldallen / SassMeister-input-HTML.html
Created October 16, 2014 15:45
Generated by SassMeister.com.
<html>
<body>
<footer>
<div>First</div>
<div>Second</div>
<div>Third</div>
</main>
</body>
</html>
@donaldallen
donaldallen / SassMeister-input-HTML.html
Created September 22, 2014 22:10
Generated by SassMeister.com.
<html>
<body>http://sassmeister.com/authorize
<main>
<article>10 columns</article>
<aside>2 columns</aside>
</main>
</body>
</html>
gulp.task('styles', function () {
return gulp.src('scss/**/*.scss')
.pipe($.rubySass({
style: 'expanded',
precision: 10,
quiet: true,
require: 'sass-globbing' // Allow's for glob importing in Sass, like: @import 'layout/*';
}))
.on('error', console.error.bind(console))
.pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))