This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am papipo on github. | |
* I am rodrigoalvarez (https://keybase.io/rodrigoalvarez) on keybase. | |
* I have a public key ASAyddAQuFFq69hkYex5axOB0vvbDIf0FRETDNeTobKLhwo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################################################################ | |
# # | |
# ------- 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: # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM elixir:1.6.1 | |
RUN mix local.hex --force | |
ENV WORKDIR /app | |
WORKDIR $WORKDIR | |
COPY mix.exs mix.lock $WORKDIR/ | |
RUN mix deps.get | |
RUN mix deps.compile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { | |
AppRegistry, | |
StyleSheet, | |
Button as ButtonN, | |
Text as TextN, | |
TextInput as TextInputN, | |
View as ViewN | |
} from 'react-native' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Aggregates are just collections of command functions, which emit events, | |
# and event handlers, which mutate state. | |
# In order to hold state, they should be also structs. | |
# There is no new() function because aggregates aren't supposed to appear | |
# out of the blue, they are always the result of a command. | |
# In this case, %OpenAccount{}. | |
defmodule Bank.Account do | |
defstruct [:account_number, :balance] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iex(1)> System.cmd("which docker", []) | |
** (ErlangError) erlang error: :enoent | |
(elixir) lib/system.ex:552: System.cmd("which docker", [], []) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var test = require('tape'), | |
m = require("mithril"), | |
occluder = require("lib/occluder"); | |
function template(child) { | |
return m(".child", {key: child, style: {height: child + "px"}}, child); | |
} | |
function view(children, o) { | |
o = o || occluder(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 ){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function store(opts) { | |
var list = []; | |
var local = opts.local; | |
var remote = opts.remote; | |
function replace(items) { | |
if (items.length) { | |
list = items; | |
} | |
return items; |
NewerOlder