I hereby claim:
- I am bjvoth on github.
- I am bjv5284 (https://keybase.io/bjv5284) on keybase.
- I have a public key ASBpCy3tXqBm4aV32-cUxGhVNoIbWa5BAh374hDHX_WO-Ao
To claim this, I am signing this object:
defmodule FizzBuzz do | |
def run() do | |
Enum.each(1..100, fn number -> | |
IO.puts(fizz_buzz(number)) | |
end) | |
end | |
def fizz_buzz(n) do | |
cond do | |
is_divisible_by_3?(n) and is_divisible_by_5?(n) -> "FizzBuzz" |
I hereby claim:
To claim this, I am signing this object:
{:ok, since} = DateTime.from_naive(~N[2018-06-21 13:26:08.003], "Etc/UTC") | |
recent = Packlane.Mongo.find(:mongo, "fulfillments", %{tags: "courier"}) |> Enum.to_list |> Enum.filter(fn fulfillment -> DateTime.compare(fulfillment["created_at"], since) == :gt end) | |
iex(packlane@127.0.0.1)5> length recent | |
1671 | |
iex(packlane@127.0.0.1)6> all_tracking_numbers = recent |> Enum.filter(fn f -> is_list(f["tracking_numbers"]) end) |> Enum.filter(fn f -> Map.get(f, "details") end) |> Enum.reduce([], fn f, a -> a ++ f["trackin | |
g_numbers"] end) | |
["781521295386", "781521474177", "781521571940", "781521864590", "781522545857", |
{:ok, since} = DateTime.from_naive(~N[2018-05-01 13:26:08.003], "Etc/UTC") | |
iex(packlane@127.0.0.1)7> since | |
#DateTime<2018-05-01 13:26:08.003Z> | |
success_tasks = Toro.Task.find_by_inserted_at(since) |> Toro.Task.by_status("success") |> Lumbergh.Repo.all | |
iex(packlane@127.0.0.1)8> success_tasks |> Enum.count | |
10000 |
const surfboard = { | |
length: '6', | |
width: '20', | |
volume: '32' | |
} | |
{length, width} = surfboard | |
console.log(length) // '6' | |
console.log(width) // '20' |
function process(tab) { | |
// dont need this try, as you aren't trying anything that will fail | |
// try { | |
console.log("process: ", tab.url) | |
if (tab.url.match(/^https?:\/\/([^/]+\.)?facebook.com\//)) { | |
console.log('url matches facebook') | |
export PATH="/usr/local/bin:$PATH" | |
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/bjvoth/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
ZSH_THEME="robbyrussell" |
var app = new Backbone.Marionette.Application(); | |
/* add the main region to the application */ | |
app.addRegions({ | |
appRegion: '#AppBase' | |
}); | |
/* define the module we will be using to create this app */ | |
app.module('RouteTest',function(module, App, Backbone, Marionette, $, _){ |
var _ = { | |
// Implements: | |
// https://lodash.com/docs#join | |
join: (array, separator = ',') => { | |
return 'FAIL :('; | |
} | |
} |
PROBLEM 1: | |
Write a method that takes a maximum bound and returns all primes starting with 0 up-to and including the maximum bound. | |
For example: | |
Should return an array that looks like this: | |
[2,3,5,7,11] | |
def prime(n) |