Skip to content

Instantly share code, notes, and snippets.

View alco's full-sized avatar
🇺🇦

Oleksii Sholik alco

🇺🇦
View GitHub Profile
@alco
alco / default
Last active August 29, 2015 14:03
10 heaviest files of each of the Elixir's apps + total size of the app. All sizes are in KiB.
508 lib/elixir/ebin/elixir_parser.beam
180 lib/elixir/ebin/Elixir.String.Unicode.beam
156 lib/elixir/ebin/Elixir.String.Graphemes.beam
112 lib/elixir/ebin/Elixir.Kernel.beam
72 lib/elixir/ebin/Elixir.Enum.beam
56 lib/elixir/ebin/Elixir.Kernel.Typespec.beam
48 lib/elixir/ebin/elixir_tokenizer.beam
48 lib/elixir/ebin/Elixir.Stream.beam
48 lib/elixir/ebin/Elixir.Kernel.SpecialForms.beam
48 lib/elixir/ebin/Elixir.File.beam
@alco
alco / default
Last active August 29, 2015 14:03
λ du -k lib/*/ebin/*.beam | sort -nr
508 lib/elixir/ebin/elixir_parser.beam
180 lib/elixir/ebin/Elixir.String.Unicode.beam
156 lib/elixir/ebin/Elixir.String.Graphemes.beam
112 lib/elixir/ebin/Elixir.Kernel.beam
72 lib/elixir/ebin/Elixir.Enum.beam
56 lib/elixir/ebin/Elixir.Kernel.Typespec.beam
...
Total: 4060 KB
defp deps do
[{:muweb, github: "alco/muweb"},
{:commando, github: "alco/commando"},
{:exrm, "~> 0.11.1", optional: true}]
end
use Mix.Config
cfg = "#{Mix.env}.exs"
if File.exists?(cfg) do
import_config cfg
end
defmodule Chat.Client do
def join(server) do
client_send server, :join
end
def say(server, message) do
client_send server, { :say, message }
end
def leave(server) do
use std::io::fs::File;
enum ReadState {
Normal,
Newline,
Skipline,
}
fn main() {
let mut at = 0i;
@alco
alco / eval.erl
Last active August 29, 2015 14:03
%%!
main([Path]) ->
%Path = get_path(),
{ok, ExprBin} = file:read_file(Path),
% confirm it is UTF-8
io:format("~w~n", [ExprBin]),
Expr1 = unicode:characters_to_list(ExprBin),
Expr2 = binary_to_list(ExprBin),
io:format("~w~n", [Expr1]),
package main
import (
"fmt"
"log"
"reflect"
"time"
)
$ docker run ... mix deps
* gproc 0.3-2-g1f12fbf (git://github.com/esl/gproc.git)
locked at 1f12fbf
ok
* wyvern 0.0.1 (git://github.com/alco/wyvern.git)
locked at 069b69f
ok
* ranch 0.9.0 (git://github.com/extend/ranch.git)
locked at 5df1f22 (ref)
ok
$ ./build.sh
All dependencies up to date
==> gproc (compile)
==> wyvern
Compiled lib/seex/seex.ex
Compiled lib/seex/compiler.ex
Compiled lib/wyvern/cache.ex
Compiled lib/wyvern/helpers.ex
Compiled lib/wyvern/html_helpers.ex
Compiled lib/wyvern/layout.ex