Skip to content

Instantly share code, notes, and snippets.

View ordovician's full-sized avatar

Erik Engheim ordovician

View GitHub Profile
@dallasmarlow
dallasmarlow / gist:2937920
Created June 15, 2012 18:10
rbenv for fish
set PATH $HOME/.rbenv/bin $PATH
set PATH $HOME/.rbenv/shims $PATH
rbenv rehash >/dev/null ^&1
@pooya-raz
pooya-raz / instaparse-sexp.clj
Created August 13, 2013 14:32
An example of parsing a simple sexp in instaparse
(ns parse.core
(:require [instaparse.core :as insta]))
(def parser
(insta/parser
"sexp = lparen operation rparen
<lparen> = <'('>
<rparen> = <')'>
operation = operator + args
operator = '+'
@monyschuk
monyschuk / StateMachine.swift
Last active September 26, 2022 15:59
Simple Swift FSM
//: Playground - noun: a place where people can play
import UIKit
/// A finite state machine
final class FSM<State, Transition>: ObservableObject where State: Hashable, Transition: Hashable {
/// current state
@Published private(set) var state: State
/// state transition graph