Skip to content

Instantly share code, notes, and snippets.

defmodule RandomTest do
use ExUnit.Case
test "randomness may be seeded" do
seed = :rand.export_seed()
list = Enum.to_list(1..10_000)
values =
for _ <- 1..10_000 do
Enum.random(list)
@iamvery
iamvery / notes.md
Last active October 1, 2021 18:32
2021-10-01 Shoals JavaScript Meetup
@iamvery
iamvery / notes.md
Last active September 17, 2021 18:29
2021-09-17 Shoals JavaScript Meetup

Where to host projects

Talking early career; landing the first job

  • LinkedIn is a good resource, but you may have to closely tweak what you list so you're "caught" in the queries recruiters throw at it.
  • example, someone mentioned changing their profile from "6mo React" to "1yr React" produced a lot more interest

"I have an endpoint that returns a JSON collection of 'exercises'. How can I display it as a web page?"

  • React
@iamvery
iamvery / notes.md
Last active March 24, 2021 17:28
2021-03-24 – Florence JS Meetup

Getting started/early career

  • Chandler Baskins spoke on "Angular Air" about lowering the barrier of entry https://www.youtube.com/watch?v=rBvpwE7tbGU
  • Ideas for how to get started?
    • think about how you learn; visual?
    • https://www.udemy.com/ worked for Chandler
    • Video can be misleading. You may think you are retaining more information than you actually are. Generally you may only take away 15% of what you see.
    • Maybe don't try to work along as you watch, but instead watch and then apply concepts on your own so that you have a chance to experience what you're learning in additional to just typing out something that's being presented
    • Having your own project to work on is a great learning strategy whether you're visual or not. It's just a good way to learn.
    • Side projects are also a good way to continue learning even once you're working fulltime.
  • https://www.freecodecamp.org/ was mentioned
.ipynb_checkpoints/
node_modules/
defmodule Power do
use Bitwise
def find(i) when i > 0 do
find(i, 1)
end
def find(i, p) when p < i do
find(i, p <<< 2)
end
module ServiceOne
def helper_one
puts "one"
end
end
module ServiceTwo
def helper_two
puts "two"
end
diff --git a/lib/money/money/arithmetic.rb b/lib/money/money/arithmetic.rb
index 38bc94e..19d6b79 100644
--- a/lib/money/money/arithmetic.rb
+++ b/lib/money/money/arithmetic.rb
@@ -125,10 +125,10 @@ class Money
[:+, :-].each do |op|
define_method(op) do |other|
unless other.is_a?(Money)
- if other.zero?
+ if other && other.zero?