View quote_prices.exs
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
#!/usr/bin/env elixir | |
Mix.install([ | |
{:icon, "~> 0.1"} | |
]) | |
defmodule Quotes do | |
use Yggdrasil | |
alias Icon.Schema.Types.EventLog |
View curl.sh
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
# Step 2: Pipe the curl's output into elixir directly. | |
# Warning: only execute scripts you trust. | |
$ FILENAME="https://raw.githubusercontent.com/wojtekmach/mix_install_examples/d98fce880eedda18747e592ec6c42b6ca817136f/scenic.exs" \ | |
curl "$FILENAME" | exsh |
View pub_sub.ex
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 PubSub do | |
@moduledoc """ | |
This module defines the basic pub-sub functions. | |
""" | |
@typedoc """ | |
Channel name. | |
""" | |
@type channel :: term() |
View Code.gs
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
/** | |
* Gathers statistics from your dev.to articles. | |
* | |
* Needs the following colunms: | |
* - Day | |
* - Date | |
* - Time | |
* - Title | |
* - Views | |
* - Reactions |
View ping_server.erl
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
-module(ping_server). | |
-behaviour(gen_server). | |
-export([start/0, serial_burst/2, concurrent_burst/2]). | |
%gen_server callbacks. | |
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, code_change/3, | |
terminate/2]). |