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
// Hold functions related to client side password validation | |
var password = function () { | |
var minPasswordLength = 8; | |
var _hasLowerCase = /[a-z]/; | |
var _hasUpperCase = /[A-Z]/; | |
var _hasDigit = /\d/; | |
var _hasNonWord = /(_|[^\w\d])/; | |
var password = []; |
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
var parseTweet = function(tweetText) { | |
var reghash, reguri, regusername; | |
reguri = /(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/=]*))/g; | |
regusername = /([@]+([A-Za-z0-9-_]+))/g; | |
reghash = /[#]+([A-Za-z0-9-_]+)/g; | |
tweetText = tweetText.replace(reguri, "<a href='$1' target='_blank'>$1</a>"); | |
tweetText = tweetText.replace(regusername, "<a href='http://twitter.com/$2' target='_blank'>$1</a>"); | |
tweetText = tweetText.replace(reghash, "<a href='http://twitter.com/search?q=%23$1' target='_blank'>#$1</a>"); | |
return tweetText; | |
}; |
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
var parseTweet = function(tweetText) { | |
var reghash, reguri, regusername; | |
reguri = /(https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&\/=]*))/g; | |
regusername = /([@]+([A-Za-z0-9-_]+))/g; | |
reghash = /[#]+([A-Za-z0-9-_]+)/g; | |
tweetText = tweetText.replace(reguri, "<a href='$1' target='_blank'>$1</a>"); | |
tweetText = tweetText.replace(regusername, "<a href='http://twitter.com/$2' target='_blank'>$1</a>"); | |
tweetText = tweetText.replace(reghash, "<a href='http://twitter.com/search?q=%23$1' target='_blank'>#$1</a>"); | |
return tweetText; | |
}; |
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
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
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
/* | |
No jQuery necessary. | |
Thanks to Dan's StackOverflow answer for this: | |
http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport | |
*/ | |
function isElementInViewport(el) { | |
var rect = el.getBoundingClientRect(); | |
return ( | |
rect.top >= 0 && |
NewerOlder