Skip to content

Instantly share code, notes, and snippets.

View rodesousa's full-sized avatar

rodesousa rodesousa

  • Kapelal
  • Paris
View GitHub Profile
@rodesousa
rodesousa / game.ex
Created March 21, 2022 12:11 — forked from andrewhao/game.ex
Dynamic Supervisors in Elixir
defmodule Game do
use GenServer
def init(game_id) do
{:ok, %{game_id: game_id}}
end
def start_link(game_id) do
GenServer.start_link(__MODULE__, game_id, name: {:global, "game:#{game_id}"})
end
@rodesousa
rodesousa / builder.go
Created August 1, 2018 11:31 — forked from vaskoz/builder.go
Golang Builder pattern
package main
import "strconv"
import "fmt"
type Color string
type Make string
type Model string
const (
@rodesousa
rodesousa / 0_reuse_code.js
Created November 2, 2016 11:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@rodesousa
rodesousa / __readme.md
Created October 25, 2016 12:49 — forked from maxivak/__readme.md
Building Docker image with Packer and provisioning with Ansible

Building Docker image with Packer and provisioning with Ansible

Overview

Packer

  • Packer is used to build image from a base image, perform provisions and store (commit) the final image.

  • We use provisioners and Packer templates to do the actual work to create the final image.

  • We use Ansible for provisioning.