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
function getQuerystringParamByName(name) { | |
var regexS, regex, results; | |
regexS = "[\\?&]" + name + "=([^&#]*)"; | |
regex = new RegExp(regexS); | |
results = regex.exec(location.href); | |
if (results === null) { | |
return null; | |
} else { | |
return (results[1] !== '') ? results[1] : 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
/** | |
* toCamelCase: converts string to camel case | |
*/ | |
String.prototype.toCameCase = function () { | |
return this.replace(/^\s+|\s+$/g, "") | |
.toLowerCase() | |
.replace(/(\s[a-z0-9])/g, function ($1) { | |
return $1.replace(/\s/, '').toUpperCase(); | |
}) | |
.replace(/\W/g, ''); |
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
/** | |
* trim: removes leading and trailing white space | |
*/ | |
String.prototype.trim = function () { | |
return this.replace(/^\s+|\s+$/g, ""); | |
}; |
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
/** | |
* toDashed: converts string to dashed | |
*/ | |
String.prototype.toDashed = function () { | |
return this.replace(/^\s+|\s+$/g, "") | |
.toLowerCase() | |
.replace(/-/g, '') | |
.replace(/(\s[a-z0-9])/g, function ($1) { | |
return $1.replace(/\s/, '-'); | |
}) |
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
/** | |
* toUnderscored: converts string to underscored | |
*/ | |
String.prototype.toUnderscored = function () { | |
return this.replace(/^\s+|\s+$/g, "") | |
.toLowerCase() | |
.replace(/_/g, '') | |
.replace(/(\s[a-z0-9])/g, function ($1) { | |
return $1.replace(/\s/, '_'); | |
}) |
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 echo(exec("whoami")); ?> |
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> | |
<head> | |
<title>Twitter feed consumption example</title> | |
<style> | |
.main { | |
margin: 0 auto; | |
position: relative; | |
width: 328px; | |
height: 302px; |
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
String.prototype.times = function( n ) { | |
return Array.prototype.join.call( { length : n + 1 }, this ); | |
}; |
OlderNewer