Skip to content

Instantly share code, notes, and snippets.

View tommysullivan's full-sized avatar

Tommy Sullivan tommysullivan

View GitHub Profile
@tommysullivan
tommysullivan / calc.ts
Last active November 12, 2023 18:17
parecel cost decision
import { sum, uniq } from "lodash"
const previousLandValue = 250000
const previousHomeValue = 450000
const previousAcreage = 20
const parcelAcreage = 3
const currentAcreage = previousAcreage - parcelAcreage
const multiplierForTwoParcelsIntrinsicValue = 1.15
const parcelViewMultiplier = 1.1
const parcelInaccessibilityMultiplier = 0.9
@tommysullivan
tommysullivan / compiler-output.txt
Last active September 14, 2018 23:23
narrowing filter example
[23:21:45] File change detected. Starting incremental compilation...
src/models/District.ts:73:7 - error TS2322: Type '(item: General) => boolean' is not assignable to type '(item: General) => item is Specific1'.
Signature '(item: General): boolean' must be a type predicate.
73 const predicate3:(item:General) => item is Specific1 = item => item.kind=="Specific1";
~~~~~~~~~~
src/models/District.ts:76:65 - error TS2345: Argument of type '(item: General) => boolean' is not assignable to parameter of type 'TypePredicate<General, General>'.
Signature '(item: General): boolean' must be a type predicate.
@tommysullivan
tommysullivan / gist:e25ff4a55e5f536cbe45ec9ce261279a
Created October 5, 2017 21:55
jenkins docker automation failed on my local
$ ./start.sh
No jenkins docker image found. Building it now...
Sending build context to Docker daemon 5.12kB
Step 1/3 : FROM jenkins/jenkins:lts
lts: Pulling from jenkins/jenkins
219d2e45b4af: Pulling fs layer
ef9ce992ffe4: Pulling fs layer
d0df8518230c: Pulling fs layer
38ae21afde7b: Pulling fs layer
2d83cd5dabc8: Pull complete
type ChurchNumeral[T] = (T => T, T) => T
def cn0[T](f:T=>T, x:T):T = x
def cn1[T](f:T=>T, x:T):T = f(x)
def cn2[T](f:T=>T, x:T):T = f(f(x))
def cn3[T](f:T=>T, x:T):T = f(f(f(x)))
def successor[T] = (n:ChurchNumeral[T]) => (f:T=>T, x:T) => f(n(f, x))
def plus[T] = (m:ChurchNumeral[T], n:ChurchNumeral[T]) => (f:T=>T, x:T) => m(f, n(f, x))