Skip to content

Instantly share code, notes, and snippets.

@rrichardsonv
rrichardsonv / shunt_on_em.ex
Created May 8, 2020 17:25
Shunting yard elixir implementation for keyword list tokens
defmodule ShuntOnEm do
@moduledoc """
Shunting yard algorithm as explained at https://en.wikipedia.org/wiki/Shunting-yard_algorithm
Refactored and repurposed from https://gist.github.com/pixyj/73bebd14be17ce680e9219f642044964
For use, primarily in traversing tokens produced by the wonderful nimbleparsec
## Examples
```
@rrichardsonv
rrichardsonv / compile_speed_test.exs
Created August 11, 2020 21:18
Compilation tracer generating compilation times, number of aliases, imports, requires, and more!
defmodule CompileSpeedTest do
use Mix.Task
@recursive
@ets_table :compile_test
@header_row "FILE,START,IMPORTS,ALIASES,REQUIRES,USES,DURATION\n"
@impl Mix.Task
def run(args \\ []) do
@rrichardsonv
rrichardsonv / udon_noodle_stir_fry.md
Created October 26, 2020 16:20
Tasty veggie udon noodles

Udon Noodle Stir-Fry

(Makes 4-5 servings)

Ingredients

Noodles

  • 1/2 lb Mushrooms (The larger grocery container)
  • Fresh Udon noodles (Not dried, See Sourcing)
  • 3 Tbs Roughly chopped peanuts (optional)
  • 1/2 lb Red Cabbage (little less than half a cabbage)