Add type="module"
to script tags:
<script type="module">
//then make sure to use the param module in unpkg:
#Add a new user | |
wp user create <username> <email> --role=administrator --user_pass=mypassword |
#verify remotes | |
git remote -v | |
#edit git config | |
git config -e |
//disables the current line: | |
// eslint-disable-line | |
//at top of file, disables linting on the entire file: | |
/* eslint-disable */ |
#force remove in powershell and unix | |
rm -rf [directory] | |
rm -r -fo [directory] | |
# download a blob url for a video | |
#Use the HLS Downloader Google Chrome extension to get the link to the M3U playlist | |
#Copy that url into the script below | |
youtube-dl --all-subs -f mp4 -o "file-name-to-save-as.mp4" "[M3U_List_URL]" |
//MAP A NUMBER FROM ONE RANGE TO ANOTHER: | |
function map_range(value, low1, high1, low2, high2) { | |
return low2 + (high2 - low2) * (value - low1) / (high1 - low1); | |
} | |
//RANDOM DECIMAL NUMBER BETWEEN [MIN] and [MAX]: | |
randomNumber(min, max) { | |
return Math.random() * (max - min) + min; | |
} |
#pyenv | |
#have pyenv manage versions: | |
echo 'eval "$(pyenv init -)"' >> ~/.bash_profile | |
#activate changes: | |
source ~/.bash_profile | |
#install particular versions | |
pyenv install X.X.X |
php -S localhost:8080 | |
#boots a local php server | |
python -m SimpleHTTPServer | |
#boots a local http server on python 2 | |
python -m http.server | |
#boots a local http server on python 3 | |
sass --watch main.scss main.css |
let modelOutput; | |
fetch('http://localhost:8000/info') | |
.then(response => response.json()) | |
.then(output => { | |
modelOutput = output; | |
// use the output in your project | |
console.log(output); | |
//to copy it from the console, right click the object in chrome and choose 'save as global variable' | |
//then type copy(temp1) and paste the clipboard contents into a .json file |
<html> | |
<head> | |
<script src="js/lib/p5.js"></script> | |
<script src="js/lib/p5.dom.js"></script> | |
<script src="js/lib/toxiclibs.js"></script> | |
<script src="data/landscape.js"></script> | |
<script src="js/stylegan-transition.js"></script> | |
</head> | |
<body> | |
</body> |