Skip to content

Instantly share code, notes, and snippets.

View guilherme-teodoro's full-sized avatar

Guilherme Teodoro guilherme-teodoro

View GitHub Profile
@guilherme-teodoro
guilherme-teodoro / pipeline.clj
Created September 9, 2016 14:46 — forked from JacobNinja/pipeline.clj
Clojure core.async pipeline example
(require '[clojure.core.async :as async]
'[clj-http.client :as client]
'[clojure.data.json :as json])
(def concurrency 5)
(let [in (async/chan)
out (async/chan)
request-handler (fn [url out*]
(async/go
@guilherme-teodoro
guilherme-teodoro / fulcro_testing_library_test.cljs
Last active January 14, 2022 17:08
Fulcro + Testing Library + Karma Example
(ns test
(:require ["@testing-library/dom" :refer [fireEvent getByRole getByText waitFor]]
[cljs.test :refer [deftest async testing use-fixtures]]
[com.fulcrologic.fulcro.application :as app]
[com.fulcrologic.fulcro.components :as comp :refer [defsc]]
[com.fulcrologic.fulcro.dom :as dom]
[com.fulcrologic.fulcro.mutations :as m]))
(use-fixtures :each
{:before (fn []
set $mod Mod1
new_window pixel 1
new_float normal
hide_edge_borders none
bindsym $mod+u border none
bindsym $mod+y border pixel 1
bindsym $mod+n border normal
const productCardMobileMachine = Machine({
id: 'productMobileCard',
initial: 'overview',
states: {
overview: {
on: {
CONTINUE: 'closed'
},
initial: 'detailClosed',
states: {
const wizardMachine = Machine({
initial: 'identification',
context: { isEligible: false },
states: {
identification: {
on: {
NEXT: 'address'
}
},
address: {
const wizardMachine = Machine({
initial: 'identification',
states: {
identification: {
on: {
NEXT: 'address'
}
},
address: {
on: {
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
const machine = Machine({
initial: 'verde',
states: {
verde: {
on: {
PROXIMO: 'amarelo'
}
},
@guilherme-teodoro
guilherme-teodoro / style.css
Last active December 16, 2020 15:43
[Stylus] Basecamp 3 - Dark mode
body {
background: #191919;
color: white;
}
h1 {
color: white;
}
.nav__bar {
const toggleMachine = Machine({
id: 'vivo-controle',
initial: 'identification',
states: {
identification: {
meta: {
step: {
number: 1
},
path: '/sp/identification'