Skip to content

Instantly share code, notes, and snippets.

@Papipo
Papipo / docker-aliases.sh
Created September 30, 2022 07:22 — forked from jgrodziski/docker-aliases.sh
Useful Docker Aliases
############################################################################
# #
# ------- Useful Docker Aliases -------- #
# #
# # Installation : #
# copy/paste these lines into your .bashrc or .zshrc file or just #
# type the following in your current shell to try it out: #
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
# #
# # Usage: #
@Papipo
Papipo / create_projection_versions.ex
Created October 20, 2016 11:05 — forked from slashdotdash/create_projection_versions.ex
Building projections with Ecto using Commanded event handlers
defmodule Projections.Repo.Migrations.CreateProjectionVersions do
use Ecto.Migration
def change do
create table(:projection_versions, primary_key: false) do
add :projection_name, :text, primary_key: true
add :last_seen_event_id, :bigint
timestamps
end
@Papipo
Papipo / occluder.js
Last active November 11, 2015 14:27 — forked from barneycarroll/occluder.js
Occlusion culling in Mithril
function occluder(){
var fresh = true;
var item = 40;
var offset = 0;
var scroller = window;
var viewport = 0;
return {
scroller : function scrollerConfig( el, init, context ){
if( arguments.length < 2 || !init || fresh ){
defmodule BankPlayground do
defmodule State do
defstruct [:id, :date_created, :balance, :changes]
@type t :: %State{}
end
defmodule AccountCreated do
defstruct [:id, :date_created]
@type t :: %AccountCreated{}
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
COLOR_NONE="\[\e[0m\]"
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
COLOR_NONE="\[\e[0m\]"