Skip to content

Instantly share code, notes, and snippets.

View arv's full-sized avatar
👋
Reflecting...

Erik Arvidsson arv

👋
Reflecting...
View GitHub Profile
@arv
arv / 0_reuse_code.js
Created July 16, 2014 14:02
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@arv
arv / gist:6528418
Created September 11, 2013 19:17 — forked from sorvell/gist:6527156
<!DOCTYPE html>
<html>
<head>
<script src="../polymer/polymer.js"></script>
</head>
<body>
<template id="host-template">
<div>host shadowRoot</div>
<content></content>
</template>
@arv
arv / soduko.js
Last active December 18, 2015 08:28 — forked from BrendanEich/gist:5753666
ES6 syntax
// XXX should be standard (and named clone, after Java?)
Object.prototype.copy = function () {
let o = {}
for (let i in this)
o[i] = this[i]
return o
}
// Containment testing for arrays and strings that should be coherent with their iterator.
Array.prototype.contains = String.prototype.contains = function (e) {