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
#!/bin/sh | |
hist=$(history | tail -1 | awk '{ print $1 }'); history -d $hist; history -d $(expr $hist - 1); unset hist |
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
/** | |
* Convert camelCase string to lowercase string with dashes (pretty permalink style ;-) | |
* | |
* @return String | |
*/ | |
String.prototype.camelCaseToDashed = function() { | |
return this.replace( /([a-z])([A-Z])/g, '$1-$2' ).toLowerCase(); | |
}; |
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
/** | |
* Convert string with dashes to camel case | |
* | |
* @return String | |
*/ | |
String.prototype.dashToCamelCase = function() { | |
return this.replace(/-([a-z])/g, function(g) { | |
return g[1].toUpperCase(); | |
}); | |
}; |
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 GFORM Scripts inline next to Form Output | |
* | |
* force the script tags inline next to the form. This allows | |
* us to regex them out each time the form is rendered. | |
* | |
* see strip_inline_gform_scripts() function below | |
* which implements the required regex | |
*/ | |
function force_gform_inline_scripts() { |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NewerOlder