Skip to content

Instantly share code, notes, and snippets.

View catharinejm's full-sized avatar
🐶

Catharine Manning catharinejm

🐶
View GitHub Profile
@catharinejm
catharinejm / squashtrouble.sh
Last active April 4, 2016 15:34
Trouble with squash merges
# Create a fresh repo
$ git init testsquash
Initialized empty Git repository in /Users/jon/Code/Sterf/testsquash/.git/
$ cd testsquash
# Commit a file to master
$ echo foo >> file
$ git add .
@catharinejm
catharinejm / evenodd.scala
Created September 22, 2016 01:20
Even/odd addition proof in scala
// See https://brianmckenna.org/blog/evenodd_agda_idris_haskell_scala
sealed trait Nat
trait Z extends Nat
case object Z extends Z
case class S[N <: Nat](n: N) extends Nat
sealed trait Even[N <: Nat]
trait EvenZ extends Even[Z]
case object EvenZ extends EvenZ
@catharinejm
catharinejm / rlock.go
Last active May 26, 2017 14:33
A re-entrant lock with sync wrapper
package main
import (
"fmt"
"sync"
"sync/atomic"
"unsafe"
)
type Owner unsafe.Pointer
{
"name": "streamy",
"version": "0.0.1",
"dependencies": {
"most": "1.5.0"
},
"devDependencies": {
"@types/node": "^8.0.18"
}
}