I hereby claim:
- I am geofflane on github.
- I am geofflane (https://keybase.io/geofflane) on keybase.
- I have a public key whose fingerprint is C499 65E1 3128 AAD9 9589 F5EC 3DCE F7AC B68F D3B5
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| class Cell | |
| DEAD = '.' | |
| ALIVE = 'x' | |
| attr_accessor :value | |
| def self.create(val, position) | |
| if val == DEAD | |
| DeadCell.new(position) | |
| else | |
| LiveCell.new(position) |
| (ns baseball.core | |
| (:require [clojure.core.async :refer (chan >!! <!! >! <! close! go go-loop)] | |
| [clojure.core.match :refer (match)])) | |
| ;; http://www.variousandsundry.com/cs/blog/2014/02/20/baseball-processes/ | |
| ;; It’s like playing catch in the backyard. You don’t want to play by yourself. So you tell a friend | |
| ;; to stand about 20 paces away from you. Once they’re there, they wave their arms to be sure you can | |
| ;; see them. Having seen them, you throw them the ball. They throw it back as a solid line drive | |
| ;; right at your mitt. End of process. |
| (ns key-drone.core-test | |
| (:use clj-drone.core) | |
| (:require [clojure.test :refer :all] | |
| [key-drone.core :refer :all])) | |
| (deftest key-handler-test | |
| (def navigation-keymap | |
| { | |
| \h :tilt-left |
| @doc """ | |
| Struct to hold the configurable portions of HTTPoision | |
| """ | |
| defmodule HTTPoison.Client do | |
| defstruct process_url: &__MODULE__.process_url/1, | |
| process_request_body: &__MODULE__.process_request_body/1, | |
| process_request_headers: &__MODULE__.process_request_headers/1, | |
| process_request_options: &__MODULE__.process_request_options/1, | |
| process_response_body: &__MODULE__.process_response_body/1, | |
| process_headers: &__MODULE__.process_headers/1, |
| map = File.read!("/path/to/file.json") |> Poison.decode!() | |
| {:ok,of} = File.open("/path/to/file.exs", [:write, :utf8]) | |
| IO.inspect(of, map, limit: 100000, pretty: true) | |
| File.close!(of) |
| defmodule App.Timer do | |
| require Logger | |
| def log(name, fun) do | |
| {time, result} = :timer.tc(fun) | |
| Logger.error("#{name}: #{time / 1000}ms") | |
| result | |
| end | |
| end |