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
/* | |
Wrap specified words in the specified tag with jQuery | |
h1, h2, and h3 are preselected because of the project this was made for. | |
Separate the words you wish to wrap by the "pipe" symbol. | |
You should note that this cascades down through all child elements. So you can be as broad or narrow as you want with the selector. | |
*/ | |
$(document).ready(function(){ | |
var pattern = /\b(of|the|in|and)/gi; // target whole words globally and case insensitive | |
var replaceWith = '<span>$1</span>'; // wrap in the tag you want |
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 | |
/** | |
* Detects if an integer is between the provided range. | |
* | |
* @param int $int | |
* The integer to test against. | |
* @param int $min | |
* The minimum number $int can be. | |
* @param int $max | |
* The maximum number $int can be. |
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
// Place in your themes functions.php | |
// feedburner subscription form | |
add_action( 'widgets_init', 'custom_load_widgets' ); | |
function custom_load_widgets() { | |
register_widget( 'FB_subscribe' ); | |
} | |
class FB_subscribe extends WP_Widget { |
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 | |
/** | |
* prints a formatted array from a per line list | |
* | |
* Each value is converted to it's own key with | |
* spaces replaced with underscores and strtolower(). | |
* Values are converted to uppercase first letters with ucwords(). | |
*/ | |
function list_to_array($string) { | |
$string = explode("\n",$string); |
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 | |
/** | |
* Limits an integer within the provided range. | |
* | |
* @param int $int | |
* The integer to test against. | |
* @param int $min_limit | |
* The minimum number $int allowed to return. | |
* @param int $max_limit | |
* The maximum number $int allowed to return. |
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 | |
/** | |
* Scales and integer to defined steps. | |
* | |
* @param int $int | |
* The integer to test against. | |
* @param int $min | |
* The minimum number of the range. | |
* @param int $max | |
* The maximum number of the range. |
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
// Pad a number with zeros to specified length. | |
Number.prototype.pad = function(length) | |
{ | |
var str = '' + this.valueOf(); | |
while (str.length < length) { | |
str = '0' + str; | |
} | |
return str; | |
} |
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 | |
/** | |
* Injects a string into an existing string in the designated position. | |
* HTML should not be effected, but who knows. | |
* | |
* @param string $inject | |
* The new string to be injected. | |
* @param string $string | |
* The original string to be alter. |
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
set -g status-position top | |
set -g status-left-length 32 | |
set -g status-right-length 150 | |
set -g status-fg blue | |
set -g status-bg black | |
set -g window-status-activity-attr bold | |
set -g pane-border-fg brightgreen | |
set -g pane-active-border-fg brightgreen | |
set -g message-fg yellow |
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
set list listchars=tab:\ \ ,trail:· | |
set timeoutlen=0 | |
let g:UltiSnipsSnippetsDir="~/.vim/bundles/UltiSnips/UltiSnips/" | |
let g:airline_theme='badwolf' | |
let g:airline_powerline_fonts=1 | |
let g:airline_section_c = '%<%t%m' | |
let g:bufferline_echo = 0 | |
" make sure vimgutter looks good |
OlderNewer