Skip to content

Instantly share code, notes, and snippets.

View willdye's full-sized avatar

William L. Dye willdye

  • Lincoln, Nebraska (USA)
View GitHub Profile
@tobia
tobia / feynman.ml
Created August 11, 2017 12:36
PBS SpaceTime Feynman Diagram Challenge
(*
Compute all possible Feynman diagrams with 1 el + 1 pos input,
1 el + 1 pos output, 4 nodes, and no self-energetic transitions.
*)
open Core.Std
type particle = Electron | Positron | Photon [@@deriving compare, sexp]
let inverse = function
| Photon -> Photon
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active June 16, 2024 13:44
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@paddycarver
paddycarver / crx-build.sh
Created February 10, 2011 11:26
A bash script that compiles Google Chrome extension folders into .crx files
#!/bin/bash -e
#
# Purpose: Pack a Chromium extension directory into crx format
if test $# -ne 2; then
echo "Usage: crxmake.sh <extension dir> <pem path>"
exit 1
fi
dir=$1