View Do you LOVE snow?
Diary of a Snow Shoveler
December 8: 6:00 PM. It started to snow. The first snow of the season and
the wife and I took our cocktails and sat for hours by the window
watching the huge soft flakes drift down from heaven. It looked like a Grandma
Moses print. So romantic we felt like newlyweds again. I love snow!
December 9: We woke to a beautiful blanket of crystal white snow
covering every inch of the landscape. What a fantastic sight! Can there be a more
lovely place in the Whole World? Moving here was the best idea I've ever
View adams-heroku-values.md

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

View unconsult.exs
With thanks to @voltone from the Elixir Slack
defmodule X do
def unconsult(filename, list) do
File.open!(filename, [:write], fn file ->
Enum.each(list, &:io.fwrite(file, '~p.~n', [&1]))
end)
end
end
View gpg.rst

GPG Cheat sheet

A small guide to little things

Create a key

View keybase.md

Keybase proof

I hereby claim:

  • I am trevoke on github.
  • I am trevoke (https://keybase.io/trevoke) on keybase.
  • I have a public key whose fingerprint is 48D1 9866 1459 C162 184F FB48 564E 4148 EBF9 21A9

To claim this, I am signing this object:

View hash.ex
# In case anyone is wondering how to easily use the :crypto hash or hmac API's from elixir-land, here you go.
File.stream!(filename, [:read, {:read_ahead, 65535}], 65535)
|> Enum.reduce(:crypto.hash_init(:sha), &:crypto.hash_update(&2, &1))
|> :crypto.hash_final
|> Base.encode16
# Line 3 opens up a stream, and we're reading in 64KB chunks from the FS which is roughly pretty efficient
# In line 4, we initialize our hash (which returns a context) and put that as the default value in the reducer
# The hash_update in the reducer returns the modified context. Remember arg1 is the item, and arg2 is the accumulator
View gist:3210a94f85eb3edae4a9
···································································································
·PORT IVY SURFACE MAP··············································································
···································································································
···································································································
······································································A·alleyway···················
······································································B·beach······················
··············B-B-T-B-B-B·············································C·lighthouse·················
·············/···/·······\············································D·docks······················
············B·Z-E-Q-R·····B-B·········································E·Main St····················
·············\··|············\········································F·bank·······················
View poor_man_irc.rb
require 'gserver'
class PoorMansIRC < GServer
@@users = []
def initialize(port, ip, *args)
super(port, ip, *args)
end
def serve(io)
View mud.rb
require_relative 'room'
room = Room.new 1, "The Nexus of the universe. The world is your oyster.", [["north", 2]]
room2 = Room.new 2, "Another room! Amazing.", [["south", 1]]
$rooms = [room, room2]
class Mud
def initialize rooms, io