Skip to content

Instantly share code, notes, and snippets.

Erin Swenson-Healey laser

Block or report user

Report or block laser

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
laser /
Last active Jul 26, 2018
Erlang/OTP Review - First Meeting


General rules for making a distributed book club like this not-awful:

  • keep your mic muted unless you're speaking
  • raise your hand if you have something to say and wait for someone to call on you
  • if you're raising your hand and nobody calls on you, type a message into the chat

Chapter 1

laser /
Created Jul 18, 2018
pattern matching Java
public abstract class Tree {
// Constructor private so the type is sealed.
private Tree() {}
public abstract <T> T match(Function<Empty, T> a,
Function<Leaf, T> b,
Function<Node, T> c);
public static final class Empty extends Tree {
public <T> T match(Function<Empty, T> a,
laser /
Created Jul 14, 2018
fork/join shell
echo ""
echo "$(date "+%T") 'fork' a process..."
# opens the file as input fd 666 before the background job (curl) is started
exec 666< <(curl -s '')
echo ""
echo "$(date "+%T") 'fork' second process..."
# opens the file as input fd 666 before the background job (curl) is started
exec 777< <(curl -s '')
laser /
Last active Jun 12, 2018
How to Run All Tests in a Single Go File
go test ./... \
-v \
-run "$(cat commands/foo_test.go \
| grep -oE "^func Test[^(]*" \
| sed -e "s/func //" \
| tr "\n" "|" \
| sed -e "s/|$//")"
laser / postalcodes.js
Last active Jun 10, 2018
postal code regular expressions
View postalcodes.js
var codes = {
"AD": "AD\\d{3}",
"AM": "(37)?\\d{4}",
"AR": "([A-HJ-NP-Z])?\\d{4}([A-Z]{3})?",
"AS": "96799",
"AT": "\\d{4}",
"AU": "\\d{4}",
"AX": "22\\d{3}",
"AZ": "\\d{4}",
"BA": "\\d{5}",

Keybase proof

I hereby claim:

  • I am laser on github.
  • I am lasericus ( on keybase.
  • I have a public key ASC9zkxig-oNF8OP2GS2jTNPEW0GOVoPMIfR0WvR0buulQo

To claim this, I am signing this object:

View concurrency-test.log
laser /
Created Mar 30, 2018
A Git pre-commit hook
if git rev-parse --verify HEAD >/dev/null 2>&1 ; then
for FILE in $(git diff-index --name-only $against) ; do
# Check if the file contains Print
laser /
Last active Feb 21, 2018
Iggypay Atinlay

Pig Latin Translator

What is Pig Latin?

From Wikipedia:

Pig Latin is a language game or argot in which words in English are altered, usually by adding a fabricated suffix or by moving the onset or initial consonant or consonant cluster of a word to the end of the word and adding a vocalic syllable to create such a suffix. The objective is to conceal the words from others not familiar with the rules.

Basic Rules


Movie Ticket Kata

First, head here to join our Zoom meeting. It will help me following along while you work through the assignment.

What Are We Building?

Write a program that calculates purchase price for movie tickets using any language you like. It should not be a full-blown web app; it can be a simple class or collection of methods invokable by your test suite. We'll provide you with some requirements, test-cases, and even a sample interface - all you have to do is give us some software.

Base Admission Rate

You can’t perform that action at this time.