Skip to content

Instantly share code, notes, and snippets.

Inspiration
Pipelines with Kotlin: https://bit.ly/2Lb1dBu
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.4.3
echo -e '\n. $HOME/.asdf/asdf.sh' >> ~/.zshrc
echo -e '\n. $HOME/.asdf/completions/asdf.bash' >> ~/.zshrc
# Plugins
asdf plugin-add erlang
asdf plugin-add elixir
asdf plugin-add nodejs
asdf plugin-add java
asdf install erlang 20.3
asdf install elixir 1.6.5

Keybase proof

I hereby claim:

  • I am sleepiejohn on github.
  • I am sleepiejohn (https://keybase.io/sleepiejohn) on keybase.
  • I have a public key ASCjgGDL2z4oHgrrEGVnyiyi3F_qxRg9rdnsj3GReJ5l3wo

To claim this, I am signing this object:

@john-eevee
john-eevee / elixir.json
Created April 15, 2018 03:49
elixir snippets for vscode
{
"def": {
"prefix": "def",
"body": [
"def $1($2) do",
" $0",
"end"
],
"description": "Default function declaration"
},
defmodule Worker do
@moduledoc File.read!("README.md")
def work() do
end
end
@john-eevee
john-eevee / mix.aliases.exs
Last active March 28, 2018 21:38
Handy aliases for mix projects
defp aliases do
[
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate", "test"],
# handy tasks grouped to easy the start of the project
hack: ["deps.get", "compile", "ecto.setup"],
# CI installation steps as one command
"ci.install": [
"local.hex --force",
@john-eevee
john-eevee / .editorconfig
Created March 11, 2018 14:32 — forked from eksperimental/.editorconfig
.editorconfig for Elixir projects
# EditorConfig is awesome: http://EditorConfig.org
# .editorconfig for Elixir projects
# https://git.io/elixir-editorconfig
# top-most EditorConfig file
root = true
[*]
indent_style = space
actice
Linked List Practice
Here's one answer—how does it compare to yours?
class Element(object):
def __init__(self, value):
self.value = value
self.next = None
defmodule Valkyrie.Processes do
@moduledoc """
Operations to perform using processes, note that this implementation
is for local processes, for remote ones look at:
`Valkyrie.Remoting.Processes`
"""
# TODO kill a process softly or hard
@doc """
@john-eevee
john-eevee / Tuple.java
Created February 7, 2018 03:56
A simple length variable Tuple implementation with safe access and typed
package com.example;
/**
* A simple length variable Tuple implementation with safe access and typed
*
* Usage example:
* Tuple<Integer> ints = new Tuple<>(1, 2, 3, 5);
* ints.at(3); // 5
* ints.at(6); // null
**/