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
// Escape all RegEx reserved characters from string | |
function escRegExp(str) { | |
return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); | |
} | |
// Return matched elements based on regex contents | |
function highlight(regex, element, child) { | |
// Create a regex based on the match string | |
var regex = new RegExp(escRegExp(regex), 'gim'); | |
// Generate results based on regex matches within match_parent |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Document</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
</head> | |
<body> | |
<div id="anothercontainer"> |
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
// Prototype for js Date object to format in Y-m-d | |
Date.prototype.ymd = function() { | |
var yyyy = this.getFullYear().toString(); | |
var mm = (this.getMonth()+1).toString(); | |
var dd = this.getDate().toString(); | |
return yyyy + '-' + (mm[1] ? mm : '0' + mm[0]) + '-' + (dd[1] ? dd : '0' + dd[0]); | |
} |
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
// Add custom tablesorter parser | |
$.tablesorter.addParser({ | |
id: 'teams', | |
is: function(s) { | |
return false; | |
}, | |
format: function(s, table, cell) { | |
return $(cell).attr('class') || s; | |
}, | |
type: 'text' |
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
// Force numeric only input | |
$.fn.numeric = function() { | |
return this.each(function() { | |
$(this).keydown(function(e) { | |
var key = e.charCode || e.keyCode || 0; | |
// Allow backspace, tab, delete, arrows, numbers, keypad numbers, home, end, period, cmd + a, cmd + r, ctrl + a, ctrl + r, and numpad decimal ONLY | |
return (key == 8 || key == 9 || key == 46 || key == 110 || key == 190 || (key >= 35 && key <= 40) || (key >= 48 && key <= 57) || (key >= 96 && key <= 105) || (key == 65 && e.ctrlKey === true) || (key == 82 && e.ctrlKey === true) || (key == 65 && e.metaKey === true) || (key == 82 && e.metaKey === true)); | |
}); | |
}); | |
} |
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
Fatal error: Uncaught exception 'OpenCloud\Common\Exceptions\ContainerNotFoundError' with message 'Container [closettheory.dev] (https://storage101.dfw1.clouddrive.com/v1/MossoCloudFS_93ae8881-b813-48ad-9e84-a7051d6a454c/closettheory.dev) not found' in /www/closettheory.dev/public/wp-content/plugins/rackspace-cloudfiles-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/ObjectStore/CDNContainer.php:212 Stack trace: #0 /www/closettheory.dev/public/wp-content/plugins/rackspace-cloudfiles-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/ObjectStore/Container.php(317): OpenCloud\ObjectStore\CDNContainer->Refresh(NULL, NULL) #1 /www/closettheory.dev/public/wp-content/plugins/rackspace-cloudfiles-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/ObjectStore/CDNContainer.php(68): OpenCloud\ObjectStore\Container->Refresh() #2 /www/closettheory.dev/public/wp-content/plugins/rackspace-cloudfiles-cdn/lib/php-opencloud-1.5.10/lib/OpenCloud/ObjectStore/ObjectStoreBase.php(46): OpenCloud\ObjectStore\CDNContainer->__construct(Object(OpenCloud\O |
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 | |
/* | |
Plugin Name: Multisite Blog Copy | |
Plugin URI: http://robido.com/multisite-blog-copy | |
Description: This is a plugin that copies multisite blogs (all their tables and files) and creates a new blog/site from it. This plugin also unserializes/reserializes and is meant for copying blogs from entirely different domain names. | |
Version: 1.0 | |
Author: Jeff Hays (jphase) | |
Author URI: http://robido.com/blog | |
License: GPL2 | |
*/ |
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
# git | |
alias gitclean='git diff --diff-filter=D --name-only -z | xargs -0 git rm' | |
# git fancy console prefix | |
export PS1="\`if [ \$? = 0 ]; then echo \[\033[32m\]ツ\[\033[0m\]; else echo \[\e[31m\]益\[\e[0m\]; fi\` \[\033[1;30m\](\A)\[\033[00m\] \[\033[37m\]\u\[\033[36m\]@\[\033[0m\]\h\[\033[01;34m\] \w \[\033[31m\]\`ruby -e \"print (%x{git branch 2> /dev/null}.each_line.grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1) ')\"\`\[\033[37m\]$\[\033[00m\] " |
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
# Bash shortcuts | |
alias ll='ls -al -G $@' | |
alias ls='ls -G $@' | |
alias grep='grep --colour $@' | |
# Git shortcuts | |
alias gitclean='git diff --diff-filter=D --name-only -z | xargs -0 git rm' | |
# Application shortcuts (based on a mac install of Sublime Text) | |
alias sublime='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl $1' |
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
/* Registration Form */ | |
#registerform p { | |
margin: 10px 0; | |
} | |
#password-strength, | |
#username-check { | |
color: #fff; | |
display: block; | |
text-align: center; |
OlderNewer