Skip to content

Instantly share code, notes, and snippets.

View zacksiri's full-sized avatar
💜
Building the Future of Software / Arming the Rebels

Zack Siri zacksiri

💜
Building the Future of Software / Arming the Rebels
View GitHub Profile
require 'benchmark'
class Selector
def initialize(key)
@key = key
end
def selector_if
if @key == :success
defmodule Bank do
use Application.Behaviour
# See http://elixir-lang.org/docs/stable/Application.Behaviour.html
# for more information on OTP Applications
def start(_type, _args) do
Bank.Supervisor.start_link
end
def start do
(0..10).each do |i|
"/Users/blah/#{i}.html"
end
@zacksiri
zacksiri / _.md
Created March 13, 2016 13:46 — forked from PyYoshi/_.md
Set overcommit_memory=1 on CoreOS
$ sudo -i
# vim /etc/systemd/system/overcommit_memory_1.service
# systemctl enable overcommit_memory_1
# systemctl start overcommit_memory_1
# systemctl status overcommit_memory_1
# cat /proc/sys/vm/overcommit_memory

Keybase proof

I hereby claim:

  • I am zacksiri on github.
  • I am zacksiri (https://keybase.io/zacksiri) on keybase.
  • I have a public key ASACOtVJ7O9Ch49pmyCynvf8kuXFwJWh4z7cvd7xP0dRcAo

To claim this, I am signing this object:

#!/bin/bash
set -eu
_UID=$(id -u)
GID=$(id -g)
# give lxd permission to map your user/group id through
grep root:$_UID:1 /etc/subuid -qs || sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root
# set up a separate key to make sure we can log in automatically via ssh
# with $HOME mounted