Skip to content

Instantly share code, notes, and snippets.

View oklaiss's full-sized avatar

Owen Klaiss oklaiss

View GitHub Profile
@oklaiss
oklaiss / osx.sh
Created June 4, 2018 18:45 — forked from earlonrails/osx.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with useful tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2263406/osx.sh | sh
#
@oklaiss
oklaiss / key_value_store.ex
Created October 3, 2016 21:50
Key Value Store in Elixir with GenServer
defmodule KeyValueStore do
use GenServer
@me __MODULE__
@moduledoc """
Implement a simple key-value store as a server. This
version creates a named server, so there is no need
to pass the server pid to the API calls.
@oklaiss
oklaiss / oa-agent.exs
Created September 28, 2016 21:47
Elixir Agents
defmodule OA do
#######
# API #
#######
def new do
{ :ok, agent } = Agent.start_link(fn -> %{ location_of: %{} } end)
agent
end