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
# custom loaders for webpack : taken from chriserin at: | |
# https://til.hashrocket.com/posts/6750cdfffd-custom-loaders-for-webpack | |
mkdir tmp | |
cd tmp | |
cat > index.html <<EOL | |
<body> | |
<script src="bundle.js"></script> | |
</body> | |
EOL | |
cat > main.js <<EOL |
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
rm package.json | |
rm -f package.json.original | |
rm -r node_modules | |
rm -r test | |
yarn init -y | |
yarn add ava browser-env -D | |
perl -0777 -i.original -pe 's/aaa/bbb/igs' package.json | |
perl -0777 -i.original -pe 's/"license": "MIT",/"license": "MIT",\n "scripts": \{\n "test": "ava --verbose"\n\n },\n "ava": \{\n "require": [\n ".\/setup-browser-env.js"\n ]\n },\n/igs' package.json | |
cat > setup-browser-env.js <<EOL |
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
cd Documents | |
mkdir first | |
cd first | |
sudo apt-get install -y curl | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt-get update && sudo apt-get install -y yarn | |
yarn init -y | |
yarn add express express-handlebars | |
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - |
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
// lists | |
// Most examples come from | |
// Functional Programming in Scala | |
// Seven Languages in Seven Weeks | |
// Programming In Scala | |
// Learn You A Haskell | |
object ListOperations { | |
def main(args: Array[String]) = { | |
NewerOlder