This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; using lumo for ClojureScript: https://github.com/anmonteiro/lumo | |
;; | |
;; https://www.wordclouds.com/ | |
;; - size: 1920x1080 | |
;; - size is typically around -45 | |
;; - shape: rectangle | |
;; - theme: black on white | |
;; - font: Ariel | |
;; | |
;; PS: Over the last 30 years, I've probably written this program over |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Posting this as an example of a bash script I never should have written: | |
# | |
# it runs inside of a CI pipeline, waits for a kubernetes job to complete, looping | |
# until kubectl reports the job finishing, either success or fail. | |
# | |
# The problem: parsing the output frm kubectl is something I've used in a bunch of scripts, | |
# including exec'ing a shell, killing a pod, listing pods... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; I mostly use Clojure running on the JVM, and ClojureScript that compiles into | |
; JavaScript that runs in browser | |
; | |
; But there are two great ClojureScripts that feel more like scripting. | |
; - Lumo runs on top of Node.js and can therefore use npm libraries | |
; https://github.com/anmonteiro/lumo | |
; - Planck runs on JavaScriptCore which powers Safari (I think) | |
; https://github.com/planck-repl/planck | |
; | |
; I chose lumo because the first Google result "clojurescript parse json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns bookserver.io | |
#:ghostwheel.core{:trace true | |
:check false | |
:num-tests 0 | |
; oustrument to check types at run-time for all functions | |
; in this namespace | |
:outstrument true} | |
(:require [clojure.spec.alpha :as s] | |
[ghostwheel.core :as g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def in ["a" "ibid" "ibid" "b"]) | |
(defn ibid | |
([in] | |
(ibid (vec (first in)) (rest in)) | |
([left right] | |
(println left right) | |
(if (empty? right) | |
; done | |
left |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Build this with "ghc ibid.hs" | |
-- Test it with "./ibid" | |
-- Import some list functions | |
import Data.List | |
-- Some refs to test on | |
refs = ["book1","book2","ibid","ibid","paper1","ibid","paper2","book3"] | |
-- Code close to what John wrote that will work in ghci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject trello-workflow "0.1.0-SNAPSHOT" | |
:dependencies [[org.clojure/clojure "1.9.0"] | |
[org.clojure/clojurescript "1.10.339"] | |
;[org.clojure/clojurescript "1.9.946"] | |
[org.clojure/core.async "LATEST"] | |
[org.clojure/test.check "0.10.0-alpha2"] | |
[reagent "0.7.0"] | |
[re-frame "0.10.5"] | |
[day8.re-frame/http-fx "0.1.6"] | |
[secretary "1.2.3"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns firebase1.core | |
(:require [clojure.java.io :as io] | |
[clojure.core.async :as async] | |
[clojure.reflect :as r]) | |
(:import (com.google.auth.oauth2 GoogleCredentials) | |
(com.google.firebase FirebaseOptions$Builder) | |
(com.google.firebase FirebaseApp) | |
(com.google.cloud.firestore.v1beta1 FirestoreClient)) | |
(:gen-class)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns analyze.oz | |
(:require [oz.core :as oz] | |
[clojure.data.json :as json])) | |
#_ (oz/start-plot-server!) | |
(defn group-data [& names] | |
(apply concat (for [n names] | |
(map-indexed (fn [i x] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns trello-workflow.trello-interfaces | |
(:require [re-frame.core :as re-frame] | |
[ajax.core :as ajax] | |
[trello-workflow.io :as io] | |
[goog.string :as gstring] | |
[goog.string.format])) | |
(defprotocol TrelloInterface | |
" interface to loading boards, lists, cards | |
{:command :load-board |
OlderNewer