Skip to content

Instantly share code, notes, and snippets.

@flyingmachine
flyingmachine / reagent-adapted-headlessui.cljs
Last active September 2, 2024 13:19
reagent-adapted headlessui
(ns reagent-adapted-headlessui
(:require
["@headlessui/react" :as hui]
[reagent.core :as r]))
(def button (r/adapt-react-class hui/Button))
(def checkbox (r/adapt-react-class hui/Checkbox))
(def close-button (r/adapt-react-class hui/CloseButton))
(def combobox-button (r/adapt-react-class hui/ComboboxButton))
(def combobox-input (r/adapt-react-class hui/ComboboxInput))
@flyingmachine
flyingmachine / 01-first-json-ld-example.json
Last active July 20, 2023 14:38
Code samples for Fluree's free introduction to JSON-LD workshop
{
"@context": {"s": "https://schema.org"},
"@type": "Cryptid",
"s:email": "[email protected]",
"s:jobTitle": "Research Assistant",
"s:name": "Freddy the Yeti"
}
;; useful for fixing linting errors
(map! :leader
(:prefix-map ("y" . "my shortcuts")
(:desc "flycheck list" "l" #'flycheck-list-errors)
(:desc "flycheck next" "j" #'flycheck-next-error)
(:desc "flycheck prev" "k" #'flycheck-previous-error)
(:desc "clj clean ns" "c" #'lsp-clojure-clean-ns)))
;; The question: how to clearly provide system def overrides?
;; There are two main scenarios where we want to do this:
;;
;; 1. Deriving a new "profile", e.g. deriving a test profile from a base profile
;; to be used for all tests
;; 2. Defining point overrides, e.g. you might want to mock out a specific component
;; only for a specific test
;;
;; Ultimately developers can use what works for them, but I want to figure out
;; the recommended approach. Also, I need to figure out the behavior of helpers

Keybase proof

I hereby claim:

  • I am flyingmachine on github.
  • I am nonrecursive (https://keybase.io/nonrecursive) on keybase.
  • I have a public key ASDS9szLnff6f8HuT0fd8PAIK9wAr_4J8_68dAGc2z50GQo

To claim this, I am signing this object:

(ns cljobs.resources.manage.os-projects
(:require [cljobs.resources.common :as c]
[cljobs.db.queries :as q]))
(def new-data (c/query-result q/user-os-projects))
(defn process-params
[ctx]
(-> (c/assoc-user ctx :os-project/user)
(update-in [:request :params]
(ns cljobs.resources.manage.os-projects
(:require [cljobs.resources.common :as c]
[cljobs.db.validations :as v]
[cljobs.db.queries :as q]
[datomic.api :as d]))
(def new-data (c/query-result q/user-os-projects))
(defn process-params
[ctx]
@flyingmachine
flyingmachine / application.css
Last active August 29, 2015 14:27
application.css
@charset "UTF-8";
@import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,300,600,700);
@import url(http://fonts.googleapis.com/css?family=Source+Code+Pro:400,600);
@-webkit-keyframes blinking {
0% {
opacity: 1; }
50% {
opacity: 0; }
100% {
opacity: 1; } }
@flyingmachine
flyingmachine / try1.clj
Created July 3, 2015 16:28
trying to get CSSTransitionGroup 0.13.3 working with Om 0.8.8
(ns pleasework.app
(:require [om.core :as om :include-macros true]
[om.dom :as dom :include-macros true]))
(enable-console-print!)
(def app-state (atom {}))
(def ctg (-> js/React (aget "addons") (aget "CSSTransitionGroup")))
[!] clj-time
✔ 0.6.0
ring/ring-core
✘ 0.5.0
cljs-ajax
[✔] org.clojure/clojure
✘ 1.7.0-beta2
cljs-ajax
✔ 1.7.0-RC2
org.clojure/clojure