Skip to content

Instantly share code, notes, and snippets.

defmodule Foo do
def something() do
IO.puts "Foo in here"
end
end
Foo.something()
~/C/C/I/i/i/slacker (master ⚡=) > mix compile
Could not start Hex. Try fetching a new version with "mix local.hex" or uninstalling it with "mix archive.uninstall hex.ez"
** (MatchError) no match of right hand side value: {:error, {:ssl, {'no such file or directory', 'ssl.app'}}}
(hex) lib/hex.ex:5: Hex.start/0
(mix) lib/mix/hex.ex:53: Mix.Hex.start/0
(mix) lib/mix/dep/loader.ex:144: Mix.Dep.Loader.with_scm_and_app/4
(mix) lib/mix/dep/loader.ex:99: Mix.Dep.Loader.to_dep/3
(elixir) lib/enum.ex:1184: Enum."-map/2-lists^map/1-0-"/2
(mix) lib/mix/dep/loader.ex:299: Mix.Dep.Loader.mix_children/1
(mix) lib/mix/dep/loader.ex:18: Mix.Dep.Loader.children/0
@brweber2
brweber2 / alexa.md
Last active May 1, 2016 20:30
Ideas for Elixir Fountain Alexa app

Elixir

Meetups

  • Where are the meetups?
  • What is the closest meetup to {City}?
  • When is the next meetup in {City}?

Conferences and Training

  • What are the upcoming conferences?
  • What training is available?
defmodule Cats do
@base_dir "cats"
def run() do
pid = start()
send pid, {self, "Virginia", "Felix"}
receive do
resp -> IO.puts "Virginia/Felix: #{inspect resp}"
after 5000 ->
defmodule Macros do
defmacro or_default(expr, default) do
quote do
try do
unquote(expr)
rescue
e ->
unquote(default)
end
end
defmodule JavaClassVersion do
def read_class_file(file) do
file
|> File.read!()
|> java_major_minor()
|> java_version()
|> IO.inspect()
end
def ex2(characters, type), do: ex2h(characters, type, [])
def ex2h([head = %{type: type} | tail], type, result) do
ex2h(tail, type, [head | result])
end
def ex2h([head | tail], type, result), do: ex2h(tail, type, result)
def ex2h([], _type, result), do: Enum.reverse(result)

Generate a new mix project.

mix new myproj

Create a release for the project.

cd myproj

Add the exrm dependency

Question 1

  • Add module documentation to redpull and generate the html files

Question 2

  • Add function documentation to redpull and generate the updated html files
@doc """