This file contains 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
# node-supervisor: https://github.com/isaacs/node-supervisor | |
# locomotive: http://locomotivejs.org/ | |
supervisor --watch app/controllers,config,config/environments,config/initializers -- node_modules/locomotive/bin/lcm.js server |
This file contains 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
slugify = (str) -> | |
str = str.replace /^\s+|\s+$/g, '' | |
str = str.toLowerCase() | |
# remove accents, swap ñ for n, etc | |
from = "àáäâèéëêìíïîòóöôùúüûñ箩·/_,:;" | |
to = "aaaaeeeeiiiioooouuuuncrc------" | |
for i, character of from.split '' | |
str = str.replace new RegExp(character, 'g'), to.charAt i |
This file contains 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
coffee -wc app.coffee |
This file contains 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
// Image replacement | |
ir() | |
width = arguments ? arguments[0] : 100% | |
height = arguments && arguments[1] ? arguments[1] : false | |
height = height ? height : width | |
direction ltr | |
display block | |
height height | |
overflow hidden |
This file contains 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
// enqueue local theme assets | |
function _enqueue_assets($css, $js) { | |
// add files to the $css or $js arrays like this | |
// 'handle' => 'js/filename.js' | |
// | |
// or like this | |
// 'handle' => array( | |
// 'src' => 'js/filename.js', // don't start with / | |
// 'deps' => null, // can be string or array of strings | |
// 'version' => null, |
This file contains 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
/* | |
* Simple javascript mobile OS / iphone/ android detector | |
* | |
* License: GPLv3+ | |
* Author: justin.kelly.org.au | |
* | |
*/ | |
$(document).ready(function() { | |
var deviceIphone = "iphone"; |
This file contains 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
// http://wordpress.org/extend/plugins/widget-css-classes/developers/ | |
// widget-css-classes/includes/widget-css-classes.class.php - Line 97 | |
// if Widget Logic plugin is enabled, use it's callback | |
if ( in_array( 'widget-logic/widget_logic.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { | |
$widget_opt = get_option( $widget_obj['callback_wl_redirect'][0]->option_name ); | |
// if Widget Context plugin is enabled, use it's callback | |
} elseif ( in_array( 'widget-context/widget-context.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) ) { | |
$widget_opt = get_option( $widget_obj['callback_original_wc'][0]->option_name ); |
This file contains 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
# rpm -Uvh http://epel.mirror.constant.com/6/i386/epel-release-6-8.noarch.rpm | |
# yum --enablerepo=epel-testing install npm |
This file contains 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
# initctl reload-configuration |
This file contains 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 | |
Class CustomDebugBarPanel extends Debug_Bar_Panel { | |
public function init() { | |
$this->title(__('Custom Debug Bar Panel', 'debug-bar')); | |
add_action('wp_print_styles', array( $this, 'print_styles')); | |
add_action('admin_print_styles', array( $this, 'print_styles')); | |
} | |
public function prerender() { |
OlderNewer