Skip to content

Instantly share code, notes, and snippets.


Tore Darell toretore

View GitHub Profile

Keybase proof

I hereby claim:

  • I am toretore on github.
  • I am toretore ( on keybase.
  • I have a public key whose fingerprint is 0D82 2905 B532 A80A CE49 E210 43B5 0AA1 B582 BDA7

To claim this, I am signing this object:

View location.elm
module Location
type Location
= None
| SelectCountry (List Country)
| CountrySelected Country
| SelectRegion Country (List Region)
| RegionSelected Country Region
| SelectCity Country Region (List City)
| Complete Country Region City
View elm-tips.elm
-- The `msg` in `Html msg` and `Cmd msg` can be anything
-- Most Elm apps will have a `Msg` type at the top lever describing the messages
-- that can be processed by `update`:
type Msg
= UserLoaded (Maybe User)
| UserSelected User
View Customers.elm
module Customers exposing (Error, Customers, init, toLoading, toFailure, toSuccess)
type alias Error = String
type Customers
= NotAsked
| Loading (Maybe Error) (Maybe (List Customer))
| Failure Error (Maybe (List Customer))
| Success (List Customer)
View logging.rb
require 'logger'
require 'fileutils'
require 'time'
require 'fiber'
module Logging
class Logger
toretore / lb.rb
Last active September 26, 2016 20:55
View lb.rb
require 'thread'
state = {time:, status: "Flux Capacitor running"}
messages =
class TimeChange
attr_reader :time
def initialize(t)
@time = t
View chrome_sockets_link.rb
View chrome_sockets.rb
require 'socket'
def log(s)
puts "#{'%H:%M:%S')}: #{s}"
server ='', 1337)
loop do
socket = server.accept
View t.rb
require 'thread'
class WorkerPool
def initialize
@num = 10
@jobs =
@results =
@stopped = false
toretore / now.rb
Last active January 9, 2016 17:00 — forked from VelizarHristov/before.rb
View now.rb
PIPELINE = %w[booked collected ironed delivered]
def state
def advance
@pipeline_position += 1