Skip to content

Instantly share code, notes, and snippets.

(my response to https://twitter.com/apotonick/status/717105889845624832)

I haven't yet came across readily available resources for large-scale application architecture for Elixir apps. I found Programming Phoenix to be a good start for that though. And there's ~30 years of knowledge in the Erlang land :)

For web apps, I found the abstractions that Elixir/Phoenix provides to be really helpful. Indeed, the list below is somewhat ORM focused.

In the small, Ecto.Schema, Ecto.Query, Ecto.Changeset, and Phoenix.View allow me to build highly composable and side-effect free modules. I can have many schemas, changesets and queries all interacting with the same underlying DB table(s) if I want to. Most of the side-effects (through Ecto.Repo for DBs) are usually in the Phoenix.Controller (or other Plugs).

@hmaurer
hmaurer / README.markdown
Created December 30, 2015 11:42 — forked from terlar/README.markdown
ArchLinux on Mac Book Retina 13"
@hmaurer
hmaurer / 32.asm
Created December 27, 2015 23:15 — forked from FiloSottile/32.asm
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
start:
push dword msg.len
push dword msg
push dword 1
mov eax, 4
-- Informatics 1 - Functional Programming
-- Lab Week Exercise
--
-- Week 2 - due: Friday, Oct 2nd, 5pm
--
-- Insert your name and matriculation number here:
-- Name:
-- Nr. :
@hmaurer
hmaurer / tmux-cheatsheet.markdown
Created September 30, 2015 22:11 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
{
"chat": {
// the list of chats may not be listed (no .read permissions here)
// a chat conversation
"$key": {
// if the chat hasn't been created yet, we allow read so there is a way
// to check this and create it; if it already exists, then authenticated
// user (specified by auth.id) must be in $key/users
public function __construct(WestcottInterface $api){
//Before filters
$this->beforeFilter('check_roles', array('except' => array('getLogin','postLogin','getLogout')));
$this->beforeFilter('csrf', array('on' => 'post'));
@hmaurer
hmaurer / a3gis.purs
Last active August 29, 2015 14:13 — forked from joneshf/a3gis.purs
module A3gis where
import Data.Traversable
import Data.Map
import Data.Maybe
foo :: forall k v. (Eq v, Ord k) => Map k v -> Map k v -> Maybe (Map k v)
foo m1 m2 = sequence $ unionWith go (Just <$> m1) (Just <$> m2)
where
go x y = if x == y then x else Nothing
@hmaurer
hmaurer / groups.p6
Last active August 29, 2015 14:07 — forked from masak/groups.p6
role Group {
method elements { ... }
method id { ... }
method op($l, $r) { ... }
}
macro assert($fact) {
quasi {
die "FAILED: ", $fact.Str
unless {{{$fact}}};
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'rack', github: 'rack/rack'
gem 'i18n', github: 'svenfuchs/i18n'
gem 'sqlite3'
GEMFILE