This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(d){ | |
var scrs=d.getElementsByTagName("script"); | |
var scr=scrs[scrs.length-1]; | |
var w=window; | |
function n(){ | |
var e=d.createElement("script"); | |
e.async=true; | |
e.src=("https:"==d.location.protocol?"https://":"http://")+"example.org/path/to/javascript.js"; | |
scr.parentNode.insertBefore(e,scr); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
body { | |
font-family:Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace; | |
} | |
.color_js_button { | |
border:none; | |
display:inline-block; | |
padding: 8px 12px; | |
border-radius: 4px; | |
margin-right: 4px; | |
box-shadow: rgba(0, 0, 0, 0.2) 0px 2px 5px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am danschultzer on github. | |
* I am danschultzer (https://keybase.io/danschultzer) on keybase. | |
* I have a public key whose fingerprint is BCD8 3343 783D 89B2 182C E607 DE85 6784 DA1D B10B | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Part one | |
defmodule CodeAdvent_1 do | |
def sum(captcha, acc) when is_integer(captcha) do | |
digits = Integer.digits(captcha) | |
first_digit = List.first(digits) | |
digits | |
|> Kernel.++([first_digit]) | |
|> sum(acc) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Generator | |
def gen_reference() do | |
min = String.to_integer("100000", 36) | |
max = String.to_integer("ZZZZZZ", 36) | |
max | |
|> Kernel.-(min) | |
|> :rand.uniform() | |
|> Kernel.+(min) | |
|> Integer.to_string(36) |