Skip to content

Instantly share code, notes, and snippets.

View ggdaltoso's full-sized avatar
💬

Gabriel Daltoso ggdaltoso

💬
View GitHub Profile
@ggdaltoso
ggdaltoso / machine.js
Created October 28, 2019 12:31
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@ggdaltoso
ggdaltoso / wc-decorator.js
Last active April 19, 2019 15:31
Decorator for defining webcomponents
function WComponent({ name }) {
return function(WebComponent) {
window.customElements.define(`wc-${name}`, WebComponent);
return WebComponent;
};
}
export default WComponent;
@ggdaltoso
ggdaltoso / prepare-commit-msg
Last active November 1, 2018 22:39
Prepend the branch sufix name to commit message.
#!/bin/sh
# Prepend the branch sufix name to commit message.
#
# Usage:
# Add this file at [repo]/.git/hooks/prepare-commit-msg
#
# Example:
#
# Branch name: