Skip to content

Instantly share code, notes, and snippets.

View llldc21's full-sized avatar

Lucas Lima de Castro Fernandes llldc21

View GitHub Profile
@llldc21
llldc21 / machine.js
Last active January 22, 2020 14:34
Generated by XState Viz: https://xstate.js.org/viz
const initial = 'DRAFT'
const machine = Machine({
id: 'e-proposal-state-machine',
initial: initial,
context: {
proposal: this.proposal
},
states: {
DRAFT: {
on: {
@llldc21
llldc21 / machine.js
Created January 17, 2020 20:12
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'fetch',
initial: 'draft',
context: {
state: 'draft'
},
states: {
draft: {
after: {
run: [
@llldc21
llldc21 / machine.js
Created January 17, 2020 20:10
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'fetch',
initial: 'draft',
context: {
state: 'draft'
},
states: {
draft: {
onEntry: ['test'],
after: {
@llldc21
llldc21 / machine.js
Created January 17, 2020 20:09
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'fetch',
initial: 'draft',
context: {
state: 'draft'
},
states: {
draft: {
onEntry: ['test'],
after: {
@llldc21
llldc21 / machine.js
Last active January 17, 2020 20:09
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'fetch',
initial: 'draft',
context: {
state: 'draft'
},
states: {
draft: {
onEntry: ['test'],
after: {
@llldc21
llldc21 / machine.js
Last active January 17, 2020 19:27
Generated by XState Viz: https://xstate.js.org/viz
const test = Machine({
id: 'teste',
initial: 'DRAFT',
states: {
DRAFT: {
on:{
READY: 'ready'
},
ready: {
type: 'final'
@llldc21
llldc21 / machine.js
Last active January 17, 2020 14:30
Generated by XState Viz: https://xstate.js.org/viz
const promiseMachine = Machine({
id: 'promise',
initial: 'draft',
states: {
draft: {
on: {
READY: 'resolved',
DELETED: 'rejected'
}
},
@llldc21
llldc21 / links-diversos
Created October 18, 2018 16:42
Links diversos sobre programação e outros

Exercícios SQL (Base de dados Sakila)

  1. Lista de todos os filmes
SELECT * 
FROM film;
  1. Lista do titulo de todos os filmes