Skip to content

Instantly share code, notes, and snippets.

View oestrich's full-sized avatar
🔡
Making text games

Eric Oestrich oestrich

🔡
Making text games
View GitHub Profile
@oestrich
oestrich / commands.exs
Last active December 14, 2017 02:38
Command parser with macros
Code.require_file("router.exs")
defmodule Commands.User do
@behaviour Router.PreParser
@impl Router.PreParser
def call(state) do
%{state | assigns: Map.put(state.assigns, :user, %{id: 10})}
end
end
@oestrich
oestrich / ex_venture.json
Created March 10, 2018 18:37
ExVenture Grafana Dashboard
{
"annotations": {
"list": [
{
"$$hashKey": "object:174",
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
@oestrich
oestrich / exventure.json
Created July 23, 2018 00:24
ExVenture Grafana Dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@oestrich
oestrich / signer.rb
Created October 21, 2015 02:21
Signing Google Cloud Storage URLs
private_key = "..."
client_email = "..."
bucket = "..."
path = "..."
full_path = "/#{bucket}/#{path}"
expiration = 5.minutes.from_now.to_i
signature_string = [
"GET",
@oestrich
oestrich / gist:0dd9cca43c48c3050f0fe1aa43be684c
Created September 28, 2018 11:14
Media types supported by ExVenture
curl -H "Accept: application/json" https://midmud.com/
curl -H "Accept: application/hal+json" https://midmud.com/
curl -H "Accept: application/vnd.siren+json" https://midmud.com/
curl -H "Accept: application/vnd.collection+json" https://midmud.com/
curl -H "Accept: application/vnd.mason+json" https://midmud.com/
@oestrich
oestrich / representer-elixir.md
Last active September 29, 2018 19:04
Representers

Representers

Starting data

order = %Order{
  id: 10,
  first_name: "User",
  last_name: "Example",
}
@oestrich
oestrich / readme.md
Last active March 12, 2019 13:20
Grapevine GMCP Action Bars

GMCP Action Bar

Actions.List {
  "actions": [
    {
      "key": "2b557868-1b1d-4ba0-8306-e7a2ebf6f965",
      "display": "Magic Missile",
      "send": "magic missile"
 },
@oestrich
oestrich / vml.md
Last active March 25, 2019 02:16
Venture Markup Language Client Spec

Venture Markup Language (VML) for Clients

Telnet Option

Constants:

  • IAC: 255
  • WILL: 251
  • WONT: 252
  • DO: 253
@oestrich
oestrich / bench.md
Last active September 3, 2019 15:44
Benchmark for io data vs strings

Simple Interpolation

Operating System: macOS
CPU Information: Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
Number of Available Cores: 4
Available memory: 8 GB
Elixir 1.8.1
Erlang 21.0.2
@oestrich
oestrich / linux.md
Last active September 19, 2019 14:57

Long

Operating System: Linux
CPU Information: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
Number of Available Cores: 8
Available memory: 61.04 GB
Elixir 1.9.0
Erlang 22.0.4