Skip to content

Instantly share code, notes, and snippets.

View gustavo-depaula's full-sized avatar
👨‍🌾
Have you watched Hamilton?

Gustavo de Paula gustavo-depaula

👨‍🌾
Have you watched Hamilton?
  • Comic Sans Global Domination Technology Conglomerate
  • São Paulo
View GitHub Profile
@gustavo-depaula
gustavo-depaula / config.lua
Last active August 6, 2023 02:43
Current lunar vim config
--
--[[
THESE ARE EXAMPLE CONFIGS FEEL FREE TO CHANGE TO WHATEVER YOU WANT
`lvim` is the global options object
]]
-- vim options
vim.opt.shiftwidth = 2
vim.opt.tabstop = 2
vim.opt.relativenumber = true
const ACTIONS = {
CHOOSE_PROBLEM: 'CHOOSE_PROBLEM',
CONTINUE: 'CONTINUE',
CHANGE_BARCODE_ID: 'CHANGE_BARCODE_ID',
CLEAN_NOTIFICATION: 'CLEAN_NOTIFICATION',
BACK: 'BACK',
CONFIRM_PROBLEM: 'CONFIRM_PROBLEM',
SKIP: 'SKIP',
UPDATE_STATUS: 'UPDATE_STATUS'
};
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
const protocolMachine = Machine(
{
id: 'protocol',
initial: 'signature',
context: {
// machine refs
signatureMachineRef: null,
recipientMachineRef: null,
packageSyncMachineRef: null,
const SSTATES = {
loadingStep: 'loadingStep',
successStep: 'successStep',
offlineStep: 'offlineStep',
redirectStep: 'redirectStep'
};
const AACTIONS = {
REDIRECT: 'REDIRECT'
};
const signatureMachine = Machine({
id: 'signature',
initial: 'init',
context: {
signature: null,
isExpectedRecipient: null
},
states: {
init: {
on: {
const signatureMachine = Machine({
id: 'signature',
initial: 'init',
context: {
signature: null,
isExpectedRecipient: null
},
states: {
init: {
on: {
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@gustavo-depaula
gustavo-depaula / square.scm
Created June 21, 2019 02:10
square scheme
(define (square x) (* x x))
;; (define (square x) (* x x))
;; | | | | | |
;; To square something, multiply it by itself.