This file contains hidden or 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
#!/bin/bash | |
# Pull ALL THE REPOS | |
# Set to your target directory. | |
DEV=~/dev | |
pull_all_repos() { | |
(find $DEV -type d -name .hg | while read line; do cd $line && hg update -C && hg pull; done && echo -e "\033[0;32mALL THE REPOSITORIES have been pulled.\033[0m") || (echo -e "\033[0;31mThere was an error!\033[0m") | |
$SHELL |
This file contains hidden or 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
/*jslint indent: 2 */ | |
/*global window*/ | |
/*global console*/ | |
/*global document*/ | |
/*global HTMLElement*/ | |
function Slider(options) { | |
'use strict'; | |
var self = this; |
This file contains hidden or 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
/** | |
* Run a query to grab the post/page content and ACF meta content of a certain | |
* page, useful for archive, and home templates where content management is | |
* needed. | |
* | |
* @param int $id the id of the post/page you'd like to grab content from | |
* @param array $fields ACF field names you'd like to grab. | |
* @return array of post/page content | |
*/ | |
function get_proxy_page_content( $id, $fields = array() ) |
This file contains hidden or 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
// Credit where due: http://www.barrelny.com/blog/text-align-justify-and-rwd/ | |
@mixin justagrid($columns: 3, $hgutter: 30, $vgutter: 30, $width: 960) { | |
$box-width: ($width / $columns) - ($hgutter / 2); | |
list-style: none; | |
margin: 0; | |
padding: 0; |
This file contains hidden or 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 | |
function sh_auto_dissolve_events( $query ) | |
if ( is_admin() ) | |
{ | |
return $query; | |
} | |
if ( ! $query->is_main_query() ) |
This file contains hidden or 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(){ | |
var curtain = document.querySelector('#site-header'); | |
var windowHeight = window.innerHeight; | |
var curtainHeight = windowHeight; | |
curtain.setAttribute('style', curtainHeight + 'px'); | |
curtain.style.height = curtainHeight + 'px'; | |
})(); |
This file contains hidden or 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 | |
/////////////////////////////// | |
// Library | |
////////////////////////////// | |
class Simple_Mail | |
{ | |
private $headers = ''; | |
public $mail_config = array(); |
This file contains hidden or 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 | |
function is_page_level($level) | |
{ | |
global $wp_query; | |
if ( ! is_page() ) | |
{ | |
return false; | |
} |
This file contains hidden or 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
name_regex = /\A[a-z+]+((\s?[a-z]+[\.\,]?)+|([a-z]+[\.\,]?)+)\s?\z/i |