Skip to content

Instantly share code, notes, and snippets.

View dominique-vassard's full-sized avatar

Dominique VASSARD dominique-vassard

  • -
  • La Vente Roulleaux (France)
View GitHub Profile
@dominique-vassard
dominique-vassard / Rnd.elm
Last active October 19, 2018 22:52
Random map andThen
module MyRnd exposing (Rnd, andThen, charFromInt, gen26, integer, letter, listNChars, listNIntegers, map, pure, toList, toTuple, twoChars, twoInts)
import Random exposing (Seed, initialSeed, int, step)
type alias Rnd a =
Seed -> ( a, Seed )
charFromInt : Int -> Char
@dominique-vassard
dominique-vassard / many_to_many relationships_in_ecto.md
Last active November 28, 2022 10:22
Many to many relationship with Ecto

1. Create the tables

see migration.ex
then
mix ecto.migrate

2. Create the schemas

see:
- role.Ex
- permission.ex
- role_permission.ex

@dominique-vassard
dominique-vassard / README.md
Last active September 19, 2017 02:02
Use bootstrap 4 and font-awesome with phoenix 1.3 and brunch

Tested on phoenix 1.3 (stand alone app and in umbrella)

1. Get dev dependencies

npm install --save-dev sass-brunch copycat-brunch
sass-brunch will be used to compile sass files to css.
copycat-brunch wille be used to cpy fonts to priv/static.

NOTE: If you are on Linux 64 bits, sass-brunch won't work in Node 8.x, be sure to use Nodejs 7.x or lower (nvm is your friend).

2. Install bootstrap and font-awesome