Skip to content

Instantly share code, notes, and snippets.

View josemunozr's full-sized avatar
🏠
Working from home

José Muñoz Ruiz josemunozr

🏠
Working from home
View GitHub Profile
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": ["airbnb"],
"globals": {
"document": false,
"escape": false,
@buren
buren / cross-origin-local-storage.js
Created November 1, 2017 10:21
Cross origin local storage sharing example (using an iframe and postMessage)
const CrossOriginLocalStorage = function(currentWindow, iframe, allowedOrigins, onMessage) {
this.allowedOrigins = allowedOrigins;
let childWindow;
// some browser (don't remember which one) throw exception when you try to access
// contentWindow for the first time, it works when you do that second time
try {
childWindow = iframe.contentWindow;
} catch(e) {
childWindow = iframe.contentWindow;
import template from './template.js';
const processedTemplate = template({
here: 'hello',
alsoHere: 'world',
})
@vitalbone
vitalbone / eslint-atom.md
Last active June 28, 2018 17:20
Configuring eslint for Atom

Configuring eslint for Atom

Dan Abramov does a really good job explaining why and how in 'Lint Like It’s 2015'

For the tl;dr version

// install atom's linter && linter-eslint
apm install linter
apm install linter-eslint