This file contains hidden or 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
| ;; see https://github.com/borkdude/grasp for a more elaborate implementation | |
| (ns script | |
| (:require [clojure.java.io :as io] | |
| [clojure.pprint :refer [pprint]] | |
| [edamame.core :as e])) | |
| (def clojure-core (slurp (io/resource "clojure/core.clj"))) | |
| (def parsed (e/parse-string-all clojure-core | |
| {:all true :auto-resolve '{:current clojure.core}})) |
This file contains hidden or 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 example.core | |
| (:require [vcr-clj.core :as vcr] | |
| [vcr-clj.clj-http :as vcr-http] | |
| [clj-http.client :as client])) | |
| (defn random [n] | |
| {:number (+ 10 (rand-int n)) | |
| :username "admin" | |
| :password "Lol, Ima Password!"}) |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| #_" -*- mode: clojure; -*-" | |
| #_( | |
| "exec" "clojure" "-Sdeps" "{:deps {clj-kondo/clj-kondo {:mvn/version \"2020.12.12\"} org.clojure/tools.deps.alpha {:mvn/version \"0.9.857\"} org.slf4j/slf4j-nop {:mvn/version \"1.7.30\"} lambdaisland/deep-diff2 {:mvn/version \"2.0.108\"} juji/editscript {:mvn/version \"0.5.4\"}}}" "-M" "$0" "$@" | |
| ) | |
| ;; Example usage: | |
| ;; api_diff.clj org.clojure/clojure "1.8.0" "1.10.1" > /tmp/diff.txt | |
| (require '[clj-kondo.core :as clj-kondo]) |
This file contains hidden or 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/sh | |
| STAGED_FILES=$(git diff-index HEAD --name-only --cached) | |
| if [[ -z $STAGED_FILES ]] | |
| then | |
| exit # no staged files, no need to run rubocop | |
| fi | |
| # Checks if any staged files have unstaged changes | |
| # otherwise rubocop isn't running on what is actually |
OlderNewer