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
export default <T extends HTMLElement>(templateString: string): T => { | |
const div = document.createElement('div'); | |
div.innerHTML = templateString; | |
return <T>div.firstElementChild; | |
} |
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
# Added this prompt for safety's sake in case you wanted to add this to your profile | |
while true; do | |
read -p "Are your sure you want to completely reset your repository, including untracked files? (y/N) " yn | |
yn=${yn:-N} | |
case "$yn" in | |
[Yy]* ) break;; | |
[Nn]* ) exit;; | |
esac | |
done |
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
if (typeof String.prototype.startsWith != 'function') { | |
String.prototype.startsWith = function (str){ | |
return this.slice(0, str.length) == str; | |
}; | |
} | |
if (typeof String.prototype.toURL != 'function') { | |
String.prototype.toURL = function () { | |
var parser = document.createElement('a'); | |
parser.href = this; |
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 | |
// Flush everything or just some pages | |
$flush_all_pages = false; | |
// An array of urls to flush (required if $flush_all_pages is false) | |
$urls = array( | |
'http://www.example.com/', | |
); | |
//Set W3TC Constants |