Keybase proof
I hereby claim:
- I am toretore on github.
- I am toretore (https://keybase.io/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:
I hereby claim:
To claim this, I am signing this object:
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 |
-------------------------------------------------------------------------------- | |
-- 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 |
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) | |
require 'logger' | |
require 'fileutils' | |
require 'time' | |
require 'fiber' | |
module Logging | |
class Logger |
require 'thread' | |
state = {time: Time.now, status: "Flux Capacitor running"} | |
messages = Queue.new | |
class TimeChange | |
attr_reader :time | |
def initialize(t) | |
@time = t | |
end |
require 'socket' | |
def log(s) | |
puts "#{Time.now.strftime('%H:%M:%S')}: #{s}" | |
end | |
html = "<a href=\"/foo\">Link</a>" | |
server = TCPServer.new('', 1337) |
require 'socket' | |
def log(s) | |
puts "#{Time.now.strftime('%H:%M:%S')}: #{s}" | |
end | |
server = TCPServer.new('', 1337) | |
loop do | |
socket = server.accept |
require 'thread' | |
class WorkerPool | |
def initialize | |
@num = 10 | |
@jobs = Queue.new | |
@results = Queue.new | |
@stopped = false |
PIPELINE = %w[booked collected ironed delivered] | |
def state | |
PIPELINE[@pipeline_position] | |
end | |
def advance | |
@pipeline_position += 1 | |
end |