I hereby claim:
- I am zzzzbov on github.
- I am zzzzbov (https://keybase.io/zzzzbov) on keybase.
- I have a public key ASCm3sWFZGZjBe02ULVLFL8z5Ol7QjOurYanaep5_uwceQo
To claim this, I am signing this object:
| import Controller from '@ember/controller'; | |
| export default class ApplicationController extends Controller { | |
| appName = 'Ember Twiddle'; | |
| interceptA(event) { | |
| event.preventDefault(); | |
| alert('preventDefault should ideally stop this link from proceeding to the example page while still allowing the parent handler to occur.'); | |
| } |
| // Get the luminance of an RGB color [0x000000, 0xFFFFFF] using the w3c procedure for relative luminance | |
| // https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests | |
| // | |
| // This code is untested | |
| const getChannelLuminance = (color: number, shift: number) => { | |
| let result = color; | |
| result &= 0xff << shift; | |
| result >>= shift; | |
| result /= 255; |
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
I hereby claim:
To claim this, I am signing this object:
| toFixed = (value, fractionDigits) => { | |
| const f = | |
| fractionDigits === undefined | |
| ? 0 | |
| : +fractionDigits | |
| console.log('1. f:', f) | |
| if (f < 0 || f > 20) { | |
| console.error('2. throw a RangeError') |
| class Profiler { | |
| constructor (name) { | |
| this._name = name | |
| this._profiles = [] | |
| this._activeProfiles = this._profiles | |
| } | |
| profile (name, fn) { | |
| if (typeof name !== 'string') { | |
| throw new TypeError('"name" must be a string') |
| (function (root, $) { | |
| "use strict"; | |
| $('[data-saveable]').on('change', ':input', function () { | |
| //flag the form as having changed | |
| $(this).closest('[data-saveable]').data('saveable', true); | |
| }).on('submit', function (e) { | |
| //if the form is successfully being submitted, it's probably being saved | |
| if (!e.isDefaultPrevented()) { | |
| //force the saveable input to lose focus | |
| //to trigger any possible change events |
| (function (root, $) { | |
| "use strict"; | |
| $.event.special.resizeelement = { | |
| setup: function () { | |
| var $this, | |
| interval, | |
| width, | |
| height; | |
| $this = $(this); | |
| width = $this.width(); |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <!-- IF PEN IS PRIVATE --> | |
| <!-- <meta name="robots" content="noindex"> --> | |
| <!-- END --> |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <title>Simple button · CodePen</title> | |
| <!-- | |
| Copyright (c) 2012 zzzzBov, http://codepen.io/zzzzBov | |
| Permission is hereby granted, free of charge, to any person obtaining |