I hereby claim:
- I am uri on github.
- I am urigorelik (https://keybase.io/urigorelik) on keybase.
- I have a public key ASDEHGnt1RSfY-SIysyW8mRw4ajygprYOFJrT5ng_MLmbQo
To claim this, I am signing this object:
| defmodule StackGenServer do | |
| use GenServer | |
| def start, do: GenServer.start(__MODULE__, [], name: __MODULE__) | |
| def query, do: GenServer.call(__MODULE__, :query) | |
| def pop, do: GenServer.call(__MODULE__, :pop) | |
| def push(element), do: GenServer.call(__MODULE__, { :push, element }) | |
| def handle_call(:query, _from, stack), do: {:reply, stack, stack} | |
| def handle_call(:pop, _from, [h|t]), do: {:reply, h, t} | |
| def handle_call(:pop, _from, []), do: {:reply, nil, []} | |
| def handle_call({ :push, element }, _from, stack), do: {:reply, [element | stack], [element | stack]} |
| start: | |
| mysql.server start | |
| redis-server & | |
| stop: | |
| mysql.server stop | |
| redis-cli shutdown | |
| clone-db: | |
| bundle exec rake dev:db:branch_dup |
| po_box_regex = /\A\b(?:p[.\s]?o?[.\s]?b?[.\s]?)\b(?:box)?|post{1}\s(?:office)?\s?(:?box|bin){1}\z/i | |
| # Matches | |
| # | |
| # P. O. Box | |
| # P.O.Box | |
| # Post Box | |
| # Post Office Box | |
| # P.O.B | |
| # P.O.B. |
| RabbitMQ 3.5.7. Copyright (C) 2007-2015 Pivotal Software, Inc. | |
| ## ## Licensed under the MPL. See http://www.rabbitmq.com/ | |
| ## ## | |
| ########## Logs: /var/log/rabbitmq/zulip@localhost.log | |
| ###### ## /var/log/rabbitmq/zulip@localhost-sasl.log | |
| ########## | |
| Starting broker... completed with 0 plugins. | |
| =WARNING REPORT==== 15-Aug-2017::11:53:14 === |
| @moduledoc """ | |
| This file showcases how the actor pattern works in elixir by using send/receive | |
| to pass messages and spawn to create a separate state for an actor. | |
| import ActorTutorial | |
| Create a tally actor and send a message | |
| tally = start_tally() | |
| send tally, {:add, 5} |
I hereby claim:
To claim this, I am signing this object:
| # frozen_string_literal: true | |
| begin | |
| require "bundler/inline" | |
| rescue LoadError => e | |
| $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
| raise e | |
| end | |
| gemfile(true) do |