This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is only working in 4.1.0-insiders20200903 | |
type ParserError<T extends string> = { error: true } & T | |
type EatWhitespace<State extends string> = | |
string extends State | |
? ParserError<"EatWhitespace got generic string type"> | |
: State extends ` ${infer State}` | `\n${infer State}` | |
? EatWhitespace<State> | |
: State | |
type AddKeyValue<Memo extends Record<string, any>, Key extends string, Value extends any> = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// <script src="angular.min.js"></script> | |
(function(name, factory) { | |
// our basic IO module system that stores every module on modules with the "file" namespace | |
// please use something like browserify rather than rolling your own like this | |
window.modules = window.modules || {}; | |
window.require = window.require || function require(name) { return window.modules[name] || window[name]; }; | |
var exports = {}; factory(exports, window.require); | |
window.modules[name] = exports; | |
}('TodoService', function(exports, require) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------------------------------------------------------------------------------- | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE TupleSections #-} | |
import Control.Applicative ((<$>)) | |
import Control.Arrow | |
import Control.Monad | |
import Data.Char (toLower) | |
import Data.Function (on) | |
import Data.List (groupBy, nub, sortBy) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TypeSynonymInstances, DeriveDataTypeable, MultiParamTypeClasses, NoMonomorphismRestriction #-} | |
-- Ty Levad - tylevad@gmail.com | |
-- xmonad.hs | |
-- Core Modules | |
import System.Exit | |
import XMonad hiding ((|||)) | |
import qualified XMonad.StackSet as W | |
-- Action Modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (c) 2010 Tobias Schneider | |
* This script is freely distributable under the terms of the MIT license. | |
*/ | |
(function(){ | |
var UPC_SET = { | |
"3211": '0', | |
"2221": '1', | |
"2122": '2', |