Convert string into an array
const strToArr = (str = "", delimiter = " ") => String(str).split(delimiter).filter(Boolean);
strToArr(document.URL, "/"); // return an []
Convert string into an array
const strToArr = (str = "", delimiter = " ") => String(str).split(delimiter).filter(Boolean);
strToArr(document.URL, "/"); // return an []
# Setting date at commit time: | |
GIT_COMMITTER_DATE="Tue Feb 7 22:47:34 2012 -0800" git commit -m "Ignore stuff" --date "Tue Feb 7 22:47:34 2012 -0800" | |
# Changing date for historical commit: | |
git filter-branch --env-filter 'if [ $GIT_COMMIT = <commit-id> ] | |
then | |
export GIT_AUTHOR_DATE="Tue Feb 7 22:47:34 2012 -0800" | |
export GIT_COMMITTER_DATE="Tue Feb 7 22:47:34 2012 -0800" |
<?php | |
//Prints human-readable information about a variable. | |
drupal_set_message('<pre>' . print_r($variable, TRUE) . '</pre>'); |
//The Conditionless For | |
for (;;) { | |
console.log("\u0049 \u2665 \u0055"); | |
} | |
//The Unchanging Condition | |
while (1 < 2) { | |
console.log("\u0049 \u2665 \u0055"); | |
} |
<html> | |
<head> | |
<script>document.documentElement.className += "loading";</script> | |
</head> | |
<body> | |
<script> | |
(function () { | |
'use strict'; | |
function removeTheClass() { |