I hereby claim:
- I am mloughran on github.
- I am mloughran (https://keybase.io/mloughran) on keybase.
- I have a public key ASCoOglpsX51BeVmxe0-db0fDe6iBgqtYlN2KKCtMcg_sgo
To claim this, I am signing this object:
<html> | |
<head> | |
<script> | |
function debug(string) { | |
var element = document.getElementById("debug"); | |
var p = document.createElement("p"); | |
p.appendChild(document.createTextNode(string)); | |
element.appendChild(p); | |
} |
require 'eventmachine' | |
# Allows calling set/clear at will, and ensures that only a single on_set or | |
# on_clear deferrable is running concurrently. It also ensures that | |
# un-necessary callbacks are not run, i.e. set-unset-set in sequency only | |
# requires the on_set callback to run once | |
# | |
# The blocks/procs supplied for on_set and on_clear must return deferrables | |
# | |
class Thing |
source :rubygems | |
gem 'eventmachine', '1.0.0.rc.4' | |
gem 'em-http-request', '1.0.2' | |
gem 'sinatra' | |
gem 'thin' |
.bundle | |
bundle | |
vendor |
I hereby claim:
To claim this, I am signing this object:
Start by following the guide from start to finish. It's really clear and written by Evan, Elm's author. Do the exercises!
https://guide.elm-lang.org
I found this example helpful as an example of piecing everything together after reading the guide
http://elm-bootstrap.info/getting-started
Don't worry about modules or splitting stuff into separate files. This advice is oft repeated in the Elm community and it's absolutely correct. The patterns that work in Elm aren't the patterns that work in other languages, and if you split modules out too early you'll make it harder to get a sense of the right module abstractions. Refacting is a breeze so you can modularise later. (See /The life of a file/ below).
require 'digest/sha1' | |
require 'net/http' | |
API_ROOT = "https://api.pwnedpasswords.com/range/" | |
def split_sha(password) | |
sha = Digest::SHA1.hexdigest(password).upcase | |
[sha[0...5], sha[5..]] | |
end |