Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert Richardson rrichardsonv

View GitHub Profile
View udon_noodle_stir_fry.md

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)
@rrichardsonv
rrichardsonv / compile_speed_test.exs
Created Aug 11, 2020
Compilation tracer generating compilation times, number of aliases, imports, requires, and more!
View compile_speed_test.exs
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 / shunt_on_em.ex
Created May 8, 2020
Shunting yard elixir implementation for keyword list tokens
View shunt_on_em.ex
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 / ntest.ex
Created Mar 18, 2020 — forked from cblavier/ntest.ex
Parallel test runner
View ntest.ex
defmodule Mix.Tasks.NTest do
use Mix.Task
@wildcard "apps/*/test/**/*_test.exs"
def run([i, n | args]) do
{i, _} = Integer.parse(i)
{n, _} = Integer.parse(n)
test_paths =
View go_intumerables.ex
defmodule GoIntumerables do
@doc """
## Example
take_into(%Bar{id: 1}, [:id], [])
# => [id: 1]
opts = [open: true, secret: "foo", source_id: "2"]
opts
@rrichardsonv
rrichardsonv / stream.js
Created Jan 15, 2020
elixir style stream
View stream.js
class Stream {
constructor (collection) {
this.collection = collection
this.transformations = []
this.acc = []
}
run () {
let acc = this.acc
let i = -1
View bad_identation patter
// (preceded by beginning of line or beginning of line followed by 2 or more spaces)
// a group of 2 spaces
// (followed by any number of spaces and ending with <)
(^|(?<=^\s{2,}))(\s{2})(?=\s*<)
View gist:cfa27f0ebc718452dbc9ecc00fc866aa
git clone https://github.com/nodenv/nodenv.git ~/.nodenv
ln -s "$SYSTEM_REPO/Dotfiles/config/nodenv/default-packages" ~/.nodenv/
( mkdir ~/.nodenv/plugins && cd ~/.nodenv/plugins && \
for PLUGIN in node-build node-build-update-defs nodenv-aliases \
nodenv-default-packages nodenv-each nodenv-package-rehash; do
git clone "https://github.com/nodenv/$PLUGIN.git"
done )
nodenv update-version-defs
@rrichardsonv
rrichardsonv / append_crappy_css.sh
Last active Aug 21, 2018
script for bad css prank
View append_crappy_css.sh
#!/bin/bash
set -e
CRAPPY_CSS_REQUESTER=$(cat <<-END
// ----------------------- PRANK COOOODE ---------------------------
// CSS Hell stylesheet appender. Makes a request on load and appends a terrifyingly bad stylesheet
document.addEventListener('DOMContentLoaded', function () {
\$.ajax({
url: 'https://gist.githubusercontent.com/rrichardsonv/09df45442428da954f6e62f4f1ce8f05/raw/16b20d0025ef961fce46bf2ad13798fc67368c6f/classic_bad_css.css',
success: function (css) {
View classic_bad_css.css
.c-virtual_list__scroll_container {
background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet) !important;
}
p, span, h1, h2, h3, h4, h5, div, section, article, body {
font-family: "Comic Sans MS", cursive, sans-serif !important;
}
.member_image{
-webkit-animation: spinToWin 5s infinite; /* Safari 4.0 - 8.0 */
animation: spinToWin 5s infinite;
You can’t perform that action at this time.