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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> |
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
let HTMLString = `<div class="wrapper"> | |
<p>some</p> | |
<span>very fancy</span> | |
<ul> | |
<li>html</li> | |
<li>inside of</li> | |
<li>a simple</li> | |
</ul> | |
<p>String</p> |
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
/* Array.isArray polyfill - taken from https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray */ | |
if (!Array.isArray) { | |
Array.isArray = function (arg) { | |
return Object.prototype.toString.call(arg) === '[object Array]' | |
} | |
} | |
function ArrayHelpers() { | |
} |
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
/** | |
* This are your TODOs: | |
* | |
* Given is a list of random integers inside of an array. You have to implement | |
* a JavaScript function which finds the first pair of entries which summ up to | |
* the given integer value. | |
* | |
* Example: | |
* - sum should be 8 | |
* - example arrays are: a = [ 1, 2, 3, 9 ] b = [ 1, 2, 4, 4 ] |
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
.DS_Store | |
node_modules/ | |
# folders with generated artefacts | |
bin/ | |
dist/ | |
# temporarily generated or built files and folders | |
.tmp/ | |
build/ |
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
# This file has been generated using '.gitattributes Generator'. | |
# You can generate yours at http://ihopepeace.github.io/gitattributes_generator | |
* text=auto | |
# Explicitly declare text files that should be normalized and converted | |
# to native line endings on checkout. | |
*.md text | |
# Declare files that should have CRLF line endings on checkout. |
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
# EditorConfig defining and maintaining consistent coding styles between different editors and IDEs | |
# see http://editorconfig.org for more information | |
# | |
root = true | |
[**] | |
# We recommend you to keep these unchanged | |
end_of_line = lf | |
charset = utf-8 |
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
/** | |
* Simple JavaScript CLI helper to strip out CSS Variable from your CSS | |
* and pipe this into a new output file which is completely cross browser | |
* compatible. | |
* | |
* Provided under ISC license: | |
* | |
* Copyright (c) 2017, Dennis Sterzenbach | |
* | |
* Permission to use, copy, modify, and/or distribute this software for any |
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
#!/bin/bash | |
## Install docker on AWS | |
### See http://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html | |
sudo yum update -y | |
sudo yum install -y docker | |
sudo service docker start | |
sudo usermod -a -G docker ec2-user |
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
const applyTemplate = (templateElement, data) => { | |
const element = templateElement.content.cloneNode(true); | |
const treeWalker = document.createTreeWalker(element, NodeFilter.SHOW_ELEMENT, () => NodeFilter.FILTER_ACCEPT); | |
while(treeWalker.nextNode()) { | |
const node = treeWalker.currentNode; | |
for(let bindAttr in node.dataset) { | |
let isBindableAttr = (bindAttr.indexOf('bind_') == 0) ? true : false; | |
if(isBindableAttr) { | |
let dataKey = node.dataset[bindAttr]; |
OlderNewer