Skip to content

Instantly share code, notes, and snippets.

View CalebMacdonaldBlack's full-sized avatar

Caleb Macdonald Black CalebMacdonaldBlack

View GitHub Profile
sadf
asdf
asdf
#!/bin/bash
if [ "$(TERM=xterm tput sgr0 2>/dev/null)" ]; then
export TERM=xterm
txtund=$(tput sgr 0 1) # Underline
txtbld=$(tput bold) # Bold
blu=$(tput setaf 4) # Blue
grn=$(tput setaf 2) # Green
red=$(tput setaf 1) # Red
bldblu=${txtbld}$(tput setaf 4) # Bold Blue
@CalebMacdonaldBlack
CalebMacdonaldBlack / shadow-cljs.edn
Created September 17, 2022 17:11
Serving shadow-cljs server-side
{:deps {}
:builds {:app {:target :browser
:output-dir "../server/resources/public/assets/js/compiled"
:asset-path "/assets/js/compiled"
:devtools {:watch-dir "../server/resources/public"}
:modules {:app {:entries [com.calebmacdonaldblack.core]}}}}}
@CalebMacdonaldBlack
CalebMacdonaldBlack / query_check.clj
Created April 11, 2018 04:05 — forked from maxweber/query_check.clj
Checks if a Datomic datalog query contains only allowed symbols / functions.
(require '[datomic.api :as d]
'[clojure.string :as str])
(defn normalize-query
"Turns a vector formatted Datomic datalog query into a map formatted
one."
[query]
(let [pairs (partition-by keyword? query)]
(assert (even? (count pairs)))
(into
(ns whatever.sub-test
(:require [reagent.core :as r]
[reagent.ratom :as ratom]
[re-frame.core :as rf]))
(def invalidate-form
(rf/->interceptor
{:before identity
:after (fn [{{:keys [:db]} :effects :as ctx}]
(assoc-in ctx [:effects :db :test-changed] true))}))
@CalebMacdonaldBlack
CalebMacdonaldBlack / .treehouse
Last active February 2, 2018 05:03 — forked from ErikGartner/.treehouse
dTree Demo
1.3.1
@CalebMacdonaldBlack
CalebMacdonaldBlack / example.sh
Created November 22, 2017 02:19
Example shell script template/boilerplate
#!/usr/bin/env bash
appname=$(basename -s .git `git config --get remote.origin.url`)
txtund=$(tput sgr 0 1) # Underline
txtbld=$(tput bold) # Bold
grn=$(tput setaf 2) # Green
red=$(tput setaf 1) # Red
bldgrn=${txtbld}$(tput setaf 2) # Bold Green
bldred=${txtbld}$(tput setaf 1) # Bold Red