Skip to content

Instantly share code, notes, and snippets.

View MarceloAlves's full-sized avatar
🔥
Breaking things

Marcelo Alves MarceloAlves

🔥
Breaking things
View GitHub Profile
@MarceloAlves
MarceloAlves / machine.js
Created August 17, 2021 15:40
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
interface Props {
text: string
}
export default function FitText({ text }: Props) {
return (
<div style={{ paddingLeft: 10 }}>
<svg
viewBox={`0 0 ${text.length * 16.5} 30`}
preserveAspectRatio='xMidYMin meet'
@MarceloAlves
MarceloAlves / machine.js
Created December 22, 2020 08:01
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@MarceloAlves
MarceloAlves / machine.js
Last active October 29, 2020 23:44
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
-- Set this property to true to always open in a new window
property open_in_new_window : false
-- Handlers
on new_window()
tell application "iTerm" to create window with default profile
end new_window
on new_tab()
tell application "iTerm" to tell the first window to create tab with default profile
const MOISTURE_LEVEL = {
WET: 1,
DRY: 0,
}
const soilMachine = Machine(
{
id: 'soil',
initial: 'startup',
@MarceloAlves
MarceloAlves / machine.js
Last active May 23, 2020 07:20
Generated by XState Viz: https://xstate.js.org/viz
const lightMachine = Machine({
id: 'light',
initial: 'green',
states: {
green: {
on: {
TIMER: 'yellow'
}
},
yellow: {
@MarceloAlves
MarceloAlves / machine.js
Last active May 21, 2020 05:09
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@MarceloAlves
MarceloAlves / machine.js
Last active May 20, 2020 02:52
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@MarceloAlves
MarceloAlves / machine.js
Last active May 12, 2020 02:39
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions