Skip to content

Instantly share code, notes, and snippets.

Rico Moorman rmoorman

Block or report user

Report or block rmoorman

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View git-tag-delete-local-and-remote.sh
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@rmoorman
rmoorman / mailhog-mamp.md
Created Apr 26, 2019 — forked from jaredatch/mailhog-mamp.md
Install MailHog with MAMP Pro
View mailhog-mamp.md

Install MailHog with MAMP Pro, using HomeBrew.

MailHog

First let's make sure HB is updated. Open up terminal for the following steps.

$ brew update
@rmoorman
rmoorman / README.md
Created Mar 29, 2019 — forked from akoppela/README.md
Custom Elements with ES5 syntax
View README.md

You'll need to include two pollyfils before you include a code with your custom elements:

webcomponents/webcomponentsjs/custom-elements-es5-adapter.js - this is for new browsers in order to understand ES5 syntax

webcomponents/custom-elements/custom-elements.min.js - this is for old browsers without customElements support

You can add them to your index.html file in the following way:

<div id="custom-elements-adapter">
@rmoorman
rmoorman / EventMachines.md
Created Mar 28, 2019 — forked from eulerfx/EventMachines.md
The relationship between state machines and event sourcing
View EventMachines.md

A state machine is defined as follows:

  • Input - a set of inputs
  • Output - a set of outputs
  • State - a set of states
  • S0 ∈ S - an initial state
  • T : Input * State -> Output * State - a transition function

If you model your services (aggregates, projections, process managers, sagas, whatever) as state machines, one issue to address is management of State. There must be a mechanism to provide State to the state machine, and to persist resulting State for subsequent retrieval. One way to address this is by storing State is a key-value store. Another way is to use a SQL database. Yet another way is event sourcing. The benefit of even sourcing is that you never need to store State itself. Instead, you rely on the Output of a service to reconstitute state. In order to do that, the state machine transition function needs to be factored into two functions as follows:

@rmoorman
rmoorman / kubernetes.md
Created Mar 16, 2019 — forked from carlessanagustin/kubernetes.md
Kubernetes tutorial steps
View kubernetes.md

1. Create cluster

Cluster up and running

minikube version
minikube start
kubectl version
@rmoorman
rmoorman / TEA_Wrong_For_Web.md
Created Mar 4, 2019 — forked from chexxor/TEA_Wrong_For_Web.md
The Elm Architecture is the wrong abstraction for the web
View TEA_Wrong_For_Web.md

The Elm Architecture is the wrong abstraction for the web

In this article, I'd like to explain why I think The Elm Architecture is fine for small components, but quite harmful for websites based on pages.

Definition and Pros/Cons

First, let's clarify what I mean by "The Elm Architecture".

The Elm Architecture's webpage describes it pretty well.

@rmoorman
rmoorman / Go overview.md
Created Jan 18, 2019 — forked from BrianWill/Go overview.md
Go language overview for experienced programmers
View Go overview.md

The Go language for experienced programmers

Why use Go?

  • Like C, but with garbage collection, memory safety, and special mechanisms for concurrency
  • Pointers but no pointer arithmetic
  • No header files
  • Simple, clean syntax
  • Very fast native compilation (about as quick to edit code and restart as a dynamic language)
  • Easy-to-distribute executables
@rmoorman
rmoorman / diff.ex
Created Nov 29, 2018 — forked from tony612/diff.ex
elixir diff(extracted from ExUnit code)
View diff.ex
defmodule Diff do
def diff(left, right, %{diff_type: :cli} = config) do
# %{enabled: true}
Diff.Cli.diff(left, right, config)
end
def format_sides(left, right, formatter) do
case format_diff(left, right, formatter) do
{left, right} ->
{IO.iodata_to_binary(left), IO.iodata_to_binary(right)}
View GenericValidator.java
package paul.sydney.controller.validation;
import java.util.Set;
import javax.validation.ConstraintViolation;
import javax.validation.Validation;
import javax.validation.ValidatorFactory;
import javax.validation.Validator;
import org.springframework.beans.factory.InitializingBean;
You can’t perform that action at this time.