Skip to content

Instantly share code, notes, and snippets.

View philpoore's full-sized avatar
🏠
Working from home

Phil Poore philpoore

🏠
Working from home
View GitHub Profile
@PatrickMassot
PatrickMassot / proof_tutorial.lean
Last active November 16, 2023 01:13
First proofs in Lean
/-
This file is intended for Lean beginners. The goal is to demonstrate what it feels like to prove
things using Lean and mathlib. Complicated definitions and theory building are not covered.
-/
-- We want real numbers and their basic properties
import data.real.basic
-- We want to be able to define functions using the law of excluded middle
local attribute [instance, priority 0] classical.prop_decidable
@philpoore
philpoore / time-docker-build.sh
Created September 5, 2018 19:13
Generate JSON output of docker build step timing, useful for profiling
#!/bin/bash
# script: time-docker-build.sh
#
# All command line arguments are passed to docker build command.
#
# usage: ./time-docker-build.sh
#
DATE_FORMAT="+%s"
@philpoore
philpoore / delayPromise.js
Last active January 17, 2016 18:22
Javascript Delay Promise with Arguments
// Delay a JS Promise by a number
// of miliseconds. Preserves arguments.
const delayPromise = (duration) => {
return (...args) => {
return new Promise((resolve, reject) => {
setTimeout(() => {
resolve(...args);
}, duration);
});
};