# bash: Place this in .bashrc.
# zsh: Place this in .zshrc.
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
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 | |
# Creator: Phil Cook | |
# Modified: Andy Miller | |
# | |
# >>> IMPORTANT: Moved to: https://github.com/rhukster/sphp.sh | |
# >>> Kept here for legacy purposes | |
# | |
osx_major_version=$(sw_vers -productVersion | cut -d. -f1) | |
osx_minor_version=$(sw_vers -productVersion | cut -d. -f2) | |
osx_patch_version=$(sw_vers -productVersion | cut -d. -f3) |
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
#!/usr/bin/env bash | |
######################################################################################################################## | |
# | |
# BUILD SCRIPT | |
# | |
# Currently the build is triggered from the current branch! | |
# | |
# The build script builds a new branch from the current branch by installing all dependencies and allowing those | |
# dependencies to be checked in with using .build.gitignore. |
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
/** | |
* Creates a Google Analytics Event on page load that tracks which default | |
* Bootstrap screen width category the user's browser falls into. | |
* | |
* See http://getbootstrap.com/css/#grid-media-queries | |
*/ | |
var width = window.innerWidth || document.body.clientWidth; | |
var bootstrapSize = 'Extra Small (xs)'; | |
if (width >= 768) { | |
bootstrapSize = 'Small (sm)'; |
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 twitter_un_filter($string) { | |
$handles = preg_replace_callback('/@([A-Za-z0-9_]+)/', | |
create_function( | |
'$handles', | |
' | |
$username = substr($handles[0], 1); | |
$handles = "<a href=\"https://twitter.com/" . $username . "\" class=\"twitter-un-filter-link\">" . $handles[0] . "</a>"; | |
return $handles; | |
' |
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 | |
/** | |
* Theme_menu_tree doesn't provide any context information | |
* THIS SUCKS | |
* But you can use hook_block_view_alter to change the theme wrapper | |
* OUF! | |
*/ | |
function MYTHEME_menu_tree(&$variables) { |
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
// add HTML5 'placeholder' support to selected inputs if not natively supported. | |
// @example: | |
// $(':text[placeholder]').placeholder(); | |
// @css: | |
// input.placeholder { color: #aaa; } /* since IE doesn't properly support :not() */ | |
// | |
(function($){ | |
if (document.createElement('input').placeholder !== undefined) { | |
$.fn.placeholder = $.noop; | |
} else { |