Skip to content

Instantly share code, notes, and snippets.

View marianboda's full-sized avatar

Marian Boda marianboda

  • Bratislava, Slovakia
View GitHub Profile
@didibus
didibus / complex_business_process_example.clj
Last active October 12, 2023 11:16
Example of a complex business process to implement in Clojure. Please link to your solutions for alternative ways to implement the same in Clojure (or other languages).
(ns complex-business-process-example
"A stupid example of a more complex business process to implement as a flowchart.")
;;;; Config
(def config
"When set to :test will trigger the not-boosted branch which won't write to db.
When set to :prod will trigger the boosted branch which will try to write to the db."
{:env :prod})
@marianboda
marianboda / .gitconfig
Last active July 21, 2021 16:05
dotfiles
[alias]
st = status -s
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
le = log --oneline --decorate
@lencioni
lencioni / AsyncComponent.jsx
Created January 8, 2017 17:09
<AsyncComponent> at Airbnb used for Webpack code splitting
// Usage:
//
// function loader() {
// return new Promise((resolve) => {
// if (process.env.LAZY_LOAD) {
// require.ensure([], (require) => {
// resolve(require('./SomeComponent').default);
// });
// }
// });
@fson
fson / rapid-prototyping-with-relay.md
Created October 18, 2015 20:08
Rapid prototyping with Relay (Reactive 2015 lightning talk proposal)

This is a proposal for a lightning talk at the Reactive 2015 conference.

NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut!

Rapid prototyping with Relay

Relay makes data fetching in React apps simpler, by letting you declare the data needs of your components instead of writing complex imperative code. React, Relay, GraphQL and the other complementary tools are changing how apps are built.

operator (<~) 49
{ $channel } => #{ yield csp.take($channel) }
operator (~>) 50 right
{ $value, $channel } => #{ yield csp.put($channel, $value) }
macro (<~alts) {
rule { } => {
yield csp.alts
}
@staltz
staltz / introrx.md
Last active May 30, 2024 18:43
The introduction to Reactive Programming you've been missing
@allgress
allgress / reagent_datascript.cljs
Last active February 16, 2023 21:16
Test use of DataScript for state management of Reagent views.
(ns reagent-test.core
(:require [reagent.core :as reagent :refer [atom]]
[datascript :as d]
[cljs-uuid-utils :as uuid]))
(enable-console-print!)
(defn bind
([conn q]
(bind conn q (atom nil)))