Skip to content

Instantly share code, notes, and snippets.

View selfup's full-sized avatar
💻
doing the most

Regis Boudinot selfup

💻
doing the most
View GitHub Profile
@rubencaro
rubencaro / install_elixir.md
Last active September 30, 2023 03:58
Elixir installation guide

Elixir installation guide

Version numbers should be the ones you want. Here I do it with the last ones available at the moment of writing.

The simplest way to install elixir is using your package manager. Sadly, at the time of writing only Fedora shows the intention to keep its packages up to date. There you can simply sudo dnf install erlang elixir and you are good to go.

Anyway, if you intend to work with several versions of erlang or elixir at the same time, or you are tied to a specific version, you will need to compile it yourself. Then asdf is your best friend.

@sergeant-wizard
sergeant-wizard / nested_loop.ex
Created October 30, 2015 05:03
nested loop in elixir
defmodule Loop do
def each([head|tail], fun) do
[fun.(head)|each(tail, fun)]
end
def each([], _) do
[]
end
end
Loop.each [1, 2], fn element ->
@Benjaminpjacobs
Benjaminpjacobs / bj-prework.md
Last active March 4, 2017 00:29 — forked from mbburch/prework.md
BJ - Turing pre-work

Turing School Prework - Benjamin Jacobs

Task A- Practice Typing:

  • screenshots of scores will be posted in comments

Task B- Algorithmic Thinking & Logic:

  • screenshots of completed sections will be posted in comments

Task C- Create your Gist:

@JoshCheek
JoshCheek / js_closure_thing.js
Last active February 11, 2017 10:21
A JS closure thing
const actionsFor = state => {
const WITH = attrs => actionsFor(Object.assign({}, state, attrs))
return {
ADD_NAME: ({ name }) => WITH({names: [name, ...state.names] }),
LOG_STATE: () => console.log(state) || actionsFor(state),
}
}
// dispatcher
const buildDispatcher = actions => (action, options={}) =>
@ndbroadbent
ndbroadbent / .dev.scpt
Last active September 22, 2022 11:46
Using AppleScript to set up iTerm2 tabs and panes for Rails development
# iTerm2 AppleScript Docs: https://www.iterm2.com/documentation-scripting.html
on run argv
set current_dir to item 1 of argv
tell application "iTerm2"
tell current window
set rails_session to current session
set current_tab to current tab
tell current session