Skip to content

Instantly share code, notes, and snippets.

View SunKing2's full-sized avatar

Louie van Bommel SunKing2

View GitHub Profile
# 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
@SunKing2
SunKing2 / makeava
Created May 17, 2017 02:52
test dom with ava, using nodejs, this is a script which creates an environment under linux (needs yarn, perl)
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
@SunKing2
SunKing2 / gist:00774b809d2cb9cb39b6ec503086e517
Created May 3, 2017 22:38
Installing node, first app with Express with Ubuntu 17.04
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 -
@SunKing2
SunKing2 / ListOperations.scala
Last active December 23, 2016 03:59
Scala List methods, operations and functions Examples code
// 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]) = {