Skip to content

Instantly share code, notes, and snippets.

View ebinnion's full-sized avatar

Eric Binnion ebinnion

View GitHub Profile
<?php
function add_filters($tags, $function) {
foreach($tags as $tag) {
add_filter($tag, $function);
}
}
function roots_rewrites() {
/**
* Define helper constants
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
sass: {
dist: {
options: {
sourceComments: 'map',
includePaths: require('node-bourbon').includePaths,
<?php
function foundation_pagination() {
global $wp_query;
$big = 999999999;
$links = paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
<?php
/* From https://www.usps.com/send/official-abbreviations.htm */
$us_state_abbrevs_names = array(
'AL'=>'ALABAMA',
'AK'=>'ALASKA',
'AS'=>'AMERICAN SAMOA',
'AZ'=>'ARIZONA',
'AR'=>'ARKANSAS',
@ebinnion
ebinnion / .bash_profile
Last active August 29, 2015 14:00
Gist of helpful commands that I use in development.
PATH=$PATH:~/bin
export PATH
alias ll='ls -lah'
# Git aliases
alias softreset='git reset --soft HEAD^'
alias hardreset='git reset --hard HEAD^'
# Following http://viget.com/inspire/terminal-aliases-for-git
<?php
/**
* The base configurations of the WordPress.
*
* This file has the following configurations: MySQL settings, Table Prefix,
* Secret Keys, WordPress Language, and ABSPATH. You can find more information
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
* wp-config.php} Codex page. You can get the MySQL settings from your web host.
*
* This file is used by the wp-config.php creation script during the
@ebinnion
ebinnion / wp_engine_max_cdn.txt
Last active August 29, 2015 14:01
WP Engine to Max CDN integration. This is added to the WP Engine tab of the WordPress admin. Relies on pull zone being set up on Max CDN and Cnames added correctly.
#http:\/\/manofhustle.com\/(\S*\.(?:jpe?g|png|gif|ttf|otf|svg|woff|xml))# => http://cdn.manofhustle.com/$1
#http:\/\/manofhustle.com\/(\S*js)# => http://js.manofhustle.com/$1
#http:\/\/manofhustle.com\/(\S*css)# => http://css.manofhustle.com/$1
<?php
$listings = array(
array(
'address' => '3410 Taft Blvd',
'city' => 'Wichita Falls',
'state' => 'Tx',
'zip' => 76308
)
);
<?php
/**
* Plugin Name: Multiple Roles per User
* Description: Allows anyone who can edit users to set multiple roles per user. In a default WordPress environment that wouldn't have much of an effect, since the user would have the privileges of the top-privileged role that you assign to him. But if you have custom roles with custom privileges, this might be helpful.
* Version: 1
* Author: nikolov.tmw
* Author URI: http://paiyakdev.com/
* License: GPL2
*/
/*