Skip to content

Instantly share code, notes, and snippets.

View shanesveller's full-sized avatar
💭
I may be slow to respond.

Shane Sveller shanesveller

💭
I may be slow to respond.
View GitHub Profile
@shanesveller
shanesveller / flake.lock
Created December 1, 2021 15:45
Rust + Axum development environment
{
"nodes": {
"cargo2nix": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
],
@shanesveller
shanesveller / adapter_dispatch.exs
Last active August 18, 2024 17:21
Benchmark different techniques to decide a callable module at runtime
# Inspired by https://engineering.tripping.com/blazing-fast-elixir-configuration-475aca10011d
# Updated with more options, including persistent_term and process locals
Mix.install([{:benchee, "~> 1.0"}])
Application.put_env(:fast_config, :adapter, TargetModule)
:persistent_term.put({:fast_config, :adapter}, TargetModule)
defmodule TargetModule do
def run, do: :ok
@shanesveller
shanesveller / exventure-concourse.yaml
Created August 25, 2018 19:45
Build a multi-stage Elixir project using Concourse CI
resources:
- name: ex_venture
type: git
source:
uri: https://github.com/oestrich/ex_venture.git
branch: master
- name: ex_venture-docker-image
type: docker-image
source:
{ mkDerivation }:
mkDerivation rec {
version = "1.7.2";
# nixnix-prefetch-url --unpack https://github.com/elixir-lang/elixir/archive/v1.7.2.tar.gz
sha256 = "0wnrx6wlpmr23ypm8za0c4dl952nj4rjylcsdzz0xrma92ylrqfq";
minimumOTPVersion = "18";
}
cask 'minikube' do
version '0.7.1'
sha256 'fc8365148be19bd020432d8ddc85c06b7aab3953300b16b24f20fcd8393de449'
url "https://github.com/kubernetes/minikube/releases/download/v#{version}/minikube-darwin-amd64"
appcast 'https://github.com/kubernetes/minikube/releases.atom',
checkpoint: '0bc485e67d85822e27770f13ab05f33a20c4d9bf2439af6cbd3aed8a3f0a052c'
name 'Minikube'
homepage 'https://github.com/kubernetes/minikube'
license :apache
@shanesveller
shanesveller / .kitchen.yml
Created November 18, 2015 17:33
VMWare Fusion kitchen-vagrant performance
---
driver:
name: vagrant
provisioner:
name: chef_solo
platforms:
- name: ubuntu-14.04
@shanesveller
shanesveller / elixir.md
Last active September 25, 2015 15:00
Elixir Resources
  • Language homepage - duh
  • RTFSource - seriously, the language source is predominantly written in Elixir by way of bootstrapping macros, and IMHO is incredibly readable and enlightening
  • Plug repo - more great source code to read
  • Phoenix Guides
  • Other Phoenix resources
  • ElixirSips - premium screencasts ala RailsCasts, etc.
  • Elixir-lang Slack team - very active, rather friendly, lots of niche channels around i.e. Phoenix, Ecto, etc.
  • #elixir-lang IRC channel on Freenode
  • Core Elixir - series of charmingly-illustrated blog posts that deep dive into parts of the stdlib
  • Elixir Radar - community news mailing list from Plataformatec
@shanesveller
shanesveller / .zshrc
Last active August 31, 2015 17:57
ZSH lazy-loading of Docker/Docker-Compose via Docker-Machine/Docker-Toolbox
docker() {
unset -f docker
VBoxManage list runningvms | grep -E "^\"dev\"" >/dev/null 2>/dev/null || docker-machine start dev
eval "$(docker-machine env dev)"
docker "$@"
}
fig() {
unset -f fig
eval "$(docker-machine env dev)"
@shanesveller
shanesveller / gist:291b4c4bef3d931fc13a
Created September 8, 2014 18:01
Logstash docker test
input {
syslog {
}
}
output {
stdout {
codec => json
}
}
@shanesveller
shanesveller / shipyard.md
Created July 17, 2014 16:48
Shipyard on OSX - 2014-07-17

Within OSX

brew cask install boot2docker
boot2docker init
boot2docker up
boot2docker ssh

Within Boot2docker