Skip to content

Instantly share code, notes, and snippets.

/* tslint:disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* Author-Claude Vervoort (Cengage), Colin Smythe (IMS Global) and James Rissler (IMS Global); Version-Final 1.0; Release Date-6th May, 2019. The contents for the LTI Deep Linking 2.0 request message JWT [ Schema version 1.0 ].
*/

Getting started with home-manger

  1. install nix https://nixos.org/download.html:
sh <(curl -L https://nixos.org/nix/install) --daemon
  1. update ~/.config/nix/nix.conf to contain:
import * as React from 'react'
type Component<Props> = (props: Props) => JSX.Element
type ReaderComponent<R, Props> = (env: R) => (props: Props) => JSX.Element
/** Combine 2 DI components */
const sequence2W =
<R1, R2, Props1, Props2>(
DIComp1: ReaderComponent<R1, Props1>,
DIComp2: ReaderComponent<R2, Props2>,
import * as S from 'parser-ts/string'
import * as C from 'parser-ts/char'
import * as P from 'parser-ts/Parser'
import { pipe } from 'fp-ts/lib/function';
import { run } from 'parser-ts/code-frame'
import { ADT } from "ts-adt";
@pfgray
pfgray / most.ts
Created December 23, 2020 17:42
most thing
import * as most from "most";
import { event } from "most-subject";
import { newDefaultScheduler, currentTime } from "@most/scheduler";
import { runEffects, propagateEventTask, tap } from "@most/core";
import { createAdapter } from "@most/adapter";
import { create } from "@most/create";
const scheduler = newDefaultScheduler();
const [induce, events] = createAdapter<number>();
import { Parser, parser } from "parser-ts/lib/Parser"
import { Do } from 'fp-ts-contrib/lib/Do'
import { char, digit, letter, space } from "parser-ts/lib/char"
import { many1 } from "parser-ts/lib/string"
import { stream } from "parser-ts/lib/Stream"
type PasswordEntry = {
min: number
max: number
import { Do } from 'fp-ts-contrib/lib/Do'
import { either, Either, right, left, getValidation } from 'fp-ts/lib/Either'
import { getMonoid } from 'fp-ts/lib/Array'
type Form = {
name: string,
startDate: string,
endDate: string,
}
set -x SBT_OPTS "-Xms512M -Xmx1536M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxMetaspaceSize=512m -Dsbt.override.build.repos=true"
set -x JAVA_OPTS "-Xms512m -Xmx768m"
set -x PATH "$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
function gifit
if test -f $argv[1]
set GIF_PATH (echo $argv[1] | sed 's/.mov/.gif/')
@pfgray
pfgray / adt.ts
Last active October 10, 2019 15:21
/**
* A sum-type generator. Uses the keys of the passed type as string discriminators
*
*
* ```ts
* type Option<T> = ADT<{
* none: {},
* some: {value: T}
* }>
@pfgray
pfgray / syntaxKind.ts
Created October 1, 2019 00:50
Takes a SyntaxKind part of Typescript AST and returns a human-readable name.
import { SyntaxKind } from "typescript";
export function toName(s: SyntaxKind): string {
switch (s) {
case SyntaxKind.Unknown:
return "Unknown";
case SyntaxKind.EndOfFileToken:
return "EndOfFileToken";
case SyntaxKind.SingleLineCommentTrivia:
return "SingleLineCommentTrivia";