Skip to content

Instantly share code, notes, and snippets.

class Observable {
constructor() {
this._handlers = []
}
subscribe(event, handler) {
this._handlers[event] = this._handlers[event] || []
this._handlers[event].push(handler)
}
@NilsWaldowski
NilsWaldowski / README.md
Created May 5, 2019 05:08 — forked from ahmadawais/VSCode_Node_Babel_Recipe.md
VSCode Node + Babel Recipe | Solves: vscode debug unexpected token import

VSCode Node + Babel Recipe

Debug Modern JavaScript with VSCode. Part of VSCode Course.

1. init a module:

npm init -y
@NilsWaldowski
NilsWaldowski / tooltip.css
Created August 30, 2016 15:16 — forked from csasbach/tooltip.css
Create tooltips on mouseover or on click (for supporting touch interfaces).
abbr
{
border-bottom: 1px dotted #666;
cursor: help;
}
.tooltip
{
position:absolute;
background-color:#eeeefe;

Font Face

A mixin for writing @font-face rules in SASS.

Usage

Create a font face rule. Embedded OpenType, WOFF2, WOFF, TrueType, and SVG files are automatically sourced.

@include font-face(Samplino, fonts/Samplino);