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
require 'bundler/setup' | |
require 'active_support/all' | |
require 'benchmark/ips' | |
class Hash | |
def new_transform_keys! | |
return enum_for(:transform_keys!) unless block_given? | |
keys.each do |key| | |
if keys.map(&:to_s).count(key.to_s) == 1 |
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 M | |
module N | |
end | |
end | |
X = M::N | |
p M::N.parent # => M | |
p X.parent # => M |
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
# Do not refactor, it is a bad practice. YOLO | |
# Not understanding why or how something works is always good. YOLO | |
# Do not ever test your code yourself, just ask. YOLO | |
# No one is going to read your code, at any point don't comment. YOLO | |
# Why do it the easy way when you can reinvent the wheel? Future-proofing is for pussies. YOLO |
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
git clone https://github.com/elixir-lang/elixir.git | |
Cloning into 'elixir'... | |
remote: Counting objects: 90688, done. | |
remote: Compressing objects: 100% (431/431), done. | |
remote: Total 90688 (delta 251), reused 6 (delta 6), pack-reused 90245 | |
Receiving objects: 100% (90688/90688), 33.08 MiB | 14.52 MiB/s, done. | |
Resolving deltas: 100% (51151/51151), done. | |
Checking connectivity... done. | |
cd elixir/ | |
make compile |
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
Erlang/OTP 18 [erts-7.2] [source] [64-bit] [async-threads:10] [kernel-poll:false] | |
Eshell V7.2 (abort with ^G) | |
1> escript:extract("demo", []). | |
{ok,[{shebang,default}, | |
{comment,[]}, | |
{emu_args,"-escript main demo_escript"}, | |
{archive,<<80,75,3,4,20,0,0,0,8,0,231,157,92,72,33,101, | |
158,13,85,12,0,...>>}]} |
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
C:\Work\tts>mix deps.compile esqlite | |
WARN: Missing plugins: [pc] | |
==> esqlite (compile) | |
Compiling c_src/esqlite3_nif.c | |
'cl.exe' is not recognized as an internal or external command, | |
operable program or batch file. | |
ERROR: compile failed while processing c:/Work/tts/deps/esqlite: rebar_abort | |
** (Mix) Could not compile dependency :esqlite, "escript.exe "c:/Users/sivsushruth/.mix/rebar" compile skip_deps=true deps_dir="c:/Work/tts/_build/dev/lib"" command failed. You can recompile this dependency with "mix deps.compile esqlite",update it with "mix deps.update esqlite" or clean it with "mix deps.clean esqlite" |
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
[<0.9316.2>] [info] 127.0.0.1 - - PUT /test_suite_db/b26eaa96deb006976d31009ff205a0f1 201 | |
[<0.9316.2>] [info] 127.0.0.1 - - PUT /test_suite_db/b26eaa96deb006976d31009ff205a099 201 | |
[<0.10769.2>] [info] Opening index for db: test_suite_db idx: ef8c8dd575a567908c39efd356a49d65 sig: "614606a8ecbb1c075d128eefbab69d1f" | |
[<0.10775.2>] [info] Starting index update for db: test_suite_db idx: ef8c8dd575a567908c39efd356a49d65 | |
sh: 1: exec: /home/sivsushruth/open: Permission denied | |
[<0.10782.2>] [error] CRASH REPORT Process <0.10782.2> with 0 neighbours exited with reason: bad return value: {os_process_error,{exit_status,126}} | |
in gen_server:init_it/6 line 356 | |
[emulator] [error] Error in process <0.10780.2> on node 'barrel@127.0.0.1' with exit value: | |
{{nocatch,{'EXIT',{{badmatch,{error,{bad_return_value,{os_process_error,{exit_status,126}}}}},[{couch_query_servers,new_process,3,[{file,"/home/sivsushruth/open source/barrel-platform/_build/default/lib/couch/src/couch_query_servers.erl"},{line,499}]},{couch_query_servers,lang_ |
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
sivsushruth@fafa-server:~/barrel-platform$ sudo DEBUG=1 ./rebar3 compile | |
===> Evaluating config script "rebar.config.script" | |
===> Expanded command sequence to be run: [{default,app_discovery}, | |
{default,install_deps}, | |
{default,lock}, | |
{default,compile}] | |
===> Evaluating config script "/home/sivsushruth/barrel-platform/_build/default/lib/gproc/rebar.config.script" | |
===> Evaluating config script "/home/sivsushruth/barrel-platform/_build/default/lib/hackney/rebar.config.script" | |
===> Verifying dependencies... | |
===> Evaluating config script "/home/sivsushruth/barrel-platform/_build/default/lib/gproc/rebar.config.script" |
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 CouchElixir do | |
def main(args) do | |
"sample return" | |
end | |
end |
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
{doc,<<"45dcf16026bd4574436d3604e6d36024">>, | |
{0,[]}, | |
{[{<<"language">>,<<"elixir">>}, | |
{<<"options">>,{[]}}, | |
{<<"views">>, | |
{[{<<"temp">>, | |
{[{<<"map">>, | |
<<"%native query start\nfun({Doc}) ->\n DocId = couch_util:get_value(<<\"_id\">>, Doc, null),\n Emit(DocId, null)\nend.\n%native query end">>}]}}]}}]}, | |
[],false,[]} |
OlderNewer