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
$(document).ready(function(){ | |
$('ul.tabs li').click(function(){ | |
var tab_id = $(this).attr('data-tab'); | |
$('ul.tabs li').removeClass('current'); | |
$('.tab-content').removeClass('current'); | |
$(this).addClass('current'); | |
$("#"+tab_id).addClass('current'); |
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
class AccordianController | |
constructor: (view, options) -> | |
@$view = $ view | |
@options = $.extend | |
header: 'dt' | |
body: 'dd' | |
header_class: 'opened' | |
body_class: 'expanded' | |
single: false | |
, options || {} |
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
var moment = require('moment'); | |
var http = require('http'); | |
var crypto = require('crypto'); | |
function makeRequest(callback) { | |
var secret = '<SHARED SECRET>' | |
var id = '<CLIENT ID>' | |
var params = 'action=brands' |
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
$ brew --config | |
HOMEBREW_VERSION: 0.9.5 | |
ORIGIN: https://github.com/Homebrew/homebrew | |
HEAD: a5e73d44cba09a13e7536c0c665bf2a041410d88 | |
HOMEBREW_PREFIX: /usr/local | |
HOMEBREW_CELLAR: /usr/local/Cellar | |
CPU: dual-core 64-bit penryn | |
OS X: 10.9.2-x86_64 | |
Xcode: 5.1.1 |
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
humjay@humjay brew update | |
Already up-to-date. | |
humjay@humjay brew doctor | |
Warning: Some installed formula are missing dependencies. | |
You should `brew install` the missing dependencies: | |
brew install unixodbc | |
Run `brew missing` for more details. |
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 bones_scripts_and_styles() { | |
global $wp_styles; // <-- you need this | |
// ie-only style sheet | |
wp_register_style( 'ie-only', get_stylesheet_directory_uri() . '/path/to/ie.css', array(), '' ); | |
wp_enqueue_style( 'ie-only' ); | |
$wp_styles->add_data( 'bones-ie-only', 'conditional', 'lt IE 9' ); // add conditional wrapper around ie stylesheet | |
} |
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
/* Create the ability to add plain text menu items. | |
* Add a new Custom Link with your text as the label, and put a "#" in the URL field. | |
* Add the item, and save your menu. This function will look for any anchor tags | |
* with a href="#" and strip them out leaving only the text. | |
*/ | |
add_filter('walker_nav_menu_start_el', 'chlk_make_plain_text_menu_items'); | |
function chlk_make_plain_text_menu_items($items) { | |
$xml = new DOMDocument(); | |
$xml->loadHTML($items); | |
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
$application_icons: remove, add, checkout, print, export; | |
.with_icon { | |
background-position: left 48%; | |
background-repeat: no-repeat; | |
padding-left: 1.5em; | |
@include background-size(auto 90%); | |
@each $icon in $application_icons { | |
&.#{$icon} { |
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
// Fix to make zepto work with ujs-jquery | |
$.fn.ajaxSend = function(callback) { | |
return this.each(function(){ | |
$(this).on('ajaxBeforeSend', callback); | |
}); | |
}; | |
var jQuery = $; |
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 convert($start, $ratio: 10px/1em) { | |
@return $start/$ratio; | |
} | |
/* image is 50px tall */ | |
convert(image-height('path/to/image.jpg')); => 5em; |