Skip to content

Instantly share code, notes, and snippets.

View IdentityDictionary.ts
import {
} from "typescript-collections";
* This data structure is effectively a Set but it is optimized for
* retrieving the instance associated with the set's identity key.
* If an instance implements this interface, the function will be used to
* create it's key value by the default implementation. Otherwise a custom

An example of a simple form

Consider the following markup:

<form class="root" state:theme=dark state:compact>
  <div class="input-area">
    <label for="username" class="label">Username:</label>
    <input id="username" class="input" type="text">
View ChromeUserAgent.css
@namespace "";
html {
display: block;
head {
display: none;
View Cascade.ts
import * as parse5 from "parse5";
import * as postcss from "postcss";
import * as CSSselect from "css-select";
import * as specificity from "specificity";
import * as propParser from "css-property-parser";
type Document = parse5.AST.HtmlParser2.Document;
type Node = parse5.AST.HtmlParser2.Node;
type ParentNode = parse5.AST.HtmlParser2.ParentNode;
type HtmlElement = parse5.AST.HtmlParser2.Element;
View typedAssert.ts
import { assert } from "chai";
export function isDefined<X>(value: X | undefined): {and: (cb: (defValue: X) => any) => void } {
if (value) {
return {
and: function(cb: (v: X) => void) {
} else {
View css-terms.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
chriseppstein / syntax_ambiguity.scss
Last active Nov 3, 2015
This file is both a legal .scss and a legal .sass file but they compile to different results.
View syntax_ambiguity.scss
{ color: red; }
color: blue
chriseppstein / vile.txt
Created Sep 4, 2015
I trained a markov chain on gamergate and generated new tweets. These are the results.
View vile.txt
Designer she just beat her Rival at Drafting for the response! ADORABLE ! WTF this is a staple in most cuisine.
Good on him Please forgive me, I must have really hurt LMFAO! *Shifty Eyes* Hehe *Wink* Nice to meet you! Active Angel as the H1PD.
Art lands in my day we had a dream about the sandstorm? The word people are thinking about us. Google result?
Got back from school~ You know whats that means~ Porn! #GGinDC stuff looks fun. We already have them on ice.
Fucked Hard And Deep -.. It Works! Actually, wouldn't mind using my 360 controller a bit better.
View grandparent_mixin.scss
@function up-to($list, $index) {
$l: ();
@each $e in $list {
@if length($l) < $index {
$l: append($l, $e, list-separator($list));
@return $l;
chriseppstein / Directory Structure
Last active Aug 29, 2015
Simple Eyeglass Assets Example
View Directory Structure
├── assets
│   ├── images
│   │   ├── foo
│   │   │   └── image1.png
│   │   └── unused.gif
│   ├── js
│   │   └── app.js
│   └── scss
│   └── app.scss