Skip to content

Instantly share code, notes, and snippets.

View p4ulcristian's full-sized avatar

Paul Martin Cristian p4ulcristian

View GitHub Profile
@p4ulcristian
p4ulcristian / web3.clj
Created February 21, 2022 04:31 — forked from nhaantraan/web3.clj
Call a smart contract from Clojure to query data from the Ethereum blockchain.
(ns web3
"Call an Ethereum smart contract (Uniswap v2) from Clojure.
Requires https://github.com/clj-python/libpython-clj for python interop. Also
make sure to $ pip install web3."
(:require [libpython-clj2.python :as py]
[libpython-clj2.require :refer [require-python]]))
(comment ;; deps.edn
@p4ulcristian
p4ulcristian / gist:95aa7b28e3568a1d3e45d27807859baf
Created May 19, 2021 18:12
@dnd-kit/sortable with drag overlay (clojurescript reagent)
(ns swordfish.sortable
(:require [reagent.core :as r]
["react" :as react]
["@dnd-kit/core" :refer [DndContext
closestCenter
KeyboardSensor
PointerSensor
TouchSensor
DragOverlay
useSensor
@p4ulcristian
p4ulcristian / gist:76146d48a9e28b3f0d8218c436b01f4c
Created May 6, 2021 16:24
@dnd-kit/sortable basic example in ClojureScript with Reagent
(ns viws.components.sortable
(:require [reagent.core :as r]
["react" :as react]
["@dnd-kit/core" :refer [DndContext
closestCenter
KeyboardSensor
PointerSensor
TouchSensor
useSensor
useSensors]]