Skip to content

Instantly share code, notes, and snippets.

View jwosty's full-sized avatar

John Wostenberg jwosty

View GitHub Profile
[<AutoOpen>]
module UoM =
// Units of measure for other than integral types
let inline (++) (w: ^W when ^W: (static member IsMeasureAbbrev: ^tm * ^t -> unit)) (t: ^t) = (# "" t: ^tm #)
let inline (--) (w: ^W when ^W: (static member IsMeasureAbbrev: ^tm * ^t -> unit)) (tm: ^tm) = (# "" tm: ^t #)
[<MeasureAnnotatedAbbreviation>]
type Guid<[<Measure>] 'm> = Guid
@kyleneideck
kyleneideck / headphones-detect.c
Created November 19, 2017 12:10
Runs a command when headphones are plugged in to or unplugged from the built-in audio device.
//
// headphones-detect.c
// Kyle Neideck, kyle@bearisdriving.com
//
// Compile with:
// clang -framework CoreAudio -framework CoreFoundation -o headphones-detect headphones-detect.c
//
// Runs a command when headphones are plugged in to or unplugged from the
// built-in audio device.
//
@baronfel
baronfel / fsharpi
Created April 8, 2018 19:42
modified fsharpi that handles piped inputs nicer (Thanks John Wostenberg!)
#!/bin/sh
EXEC="exec "
FSHARPI_OPTIONS=""
if test x"$1" = x--debug; then
DEBUG=--debug
shift
fi
if test x"$1" = x--gdb; then
@bash
bash / guide.md
Last active March 11, 2024 11:31
A Hitchhiker's Guide to MSBuild, the .NET SDK, and Everything