Skip to content

Instantly share code, notes, and snippets.

import Component from '@glimmer/component';
export default class extends Component {
wycats / 1-js.js
Created Jul 30, 2020
alternative observer design
View 1-js.js
// observed popover is interested in changes to `width` and `height` relative to the
// page's origin, and normalized by rounding them to the nearest integer.
let observedPopover = new RectObserver(
width: Math.round,
height: Math.round
relativeTo: 'origin' // not viewport
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
value: 'Hello world',
inputted(e) {
Ember.set(this, 'value',;
View js.ts
// default tagName is 'div'
// The problem
function createElement(tagName: string): Element {
// very broken
return document.createElement(tagName || 'div');
// you might want to use defaults
import Ember from 'ember';
export default Ember.Component.extend({
View monad-stuff.ts
import { unknown } from 'ts-std';
import { ErrorMessage } from "monad-test";
export type ErrorPath = ReadonlyArray<string>;
export interface ErrorMessage {
key: string;
args: unknown;
import FirebaseAdapter from 'emberfire/adapters/firebase';
export default FirebaseAdapter.extend({

The Ember Creed

  1. Optimize for programmer happiness
  2. Convention over configuration
  3. The menu is omakase
  4. No one paradigm
  5. Exalt beautiful code
  6. Provide sharp knives
  7. Value integrated systems
  8. Stability without Stagnation
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
wycats /
Last active Apr 8, 2018
A Response to "The Birthering of the Democrats"

Response to The Birthering of the Democrats

Let us accept from the outset that partisan Democrats and I will never agree on the substance of the particular claims they have made about the election. Let’s simply try to find common ground on what they’re alleging. Conventional post-election debate among Democrats has involved…

Freddie claims that "conventional post-election debate among Democrats" is made up of a number of characteristics. I don't think the debate has been nearly as homogenous as he implies, and the bullets are full of misleading hyperbole that further amps up the emotion of the piece.