Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
items: [{'name': 'Bob'}]
});
@dstaley
dstaley / elevation.js
Last active January 3, 2018 00:48
Material Design elevations powered by emotion.
// Adapted from https://github.com/material-components/material-components-web
import { css } from "emotion";
import tinycolor from "tinycolor2";
const umbraMap = {
"0": "0px 0px 0px 0px",
"1": "0px 2px 1px -1px",
"2": "0px 3px 1px -2px",
"3": "0px 3px 3px -2px",
"4": "0px 2px 4px -1px",
// Adapted from Python's implementation of randrange.
// https://github.com/python/cpython/blob/master/Lib/random.py
const crypto = require('crypto');
const bases = require('bases');
const START = 33554432; // '100000'
const END = 1073741824; // 'ZZZZZZ'
function getrandbits(k) {