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
(require '[clojure.java.io :as io]) | |
(defmacro with-file | |
"bindings => [name init ...] | |
Evaluates body in a try expression with names bound to the values | |
of the inits, and a finally clause that calls (io/delete-file name) on each | |
name in reverse order." | |
[bindings & body] | |
(#'clojure.core/assert-args | |
(vector? bindings) "a vector for its binding" |
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
(require '[spire.module.shell :refer [shell]]) | |
;; >>= :: m a -> (a -> m b) -> m b | |
(defn >>= [{:keys [result out-lines] :as prev} f] | |
(if (= result :ok) | |
(f out-lines) | |
prev)) | |
;; return :: a -> m a | |
(defn return [cmd] |
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
import XMonad (def, modMask, mod4Mask, xK_q, xK_w, xK_e, xK_a, xK_s, xK_d, borderWidth, layoutHook) | |
import XMonad.Main (xmonad) | |
import XMonad.Layout.Grid | |
import XMonad.Util.EZConfig (additionalKeys) | |
import XMonad.Util.PureX (defile, greedyView) | |
-- https://hoogle.haskell.org/ | |
winKey = mod4Mask |
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 bb | |
(ns print-nvd-diff | |
(:require | |
[babashka.cli :as cli] | |
[babashka.fs :as fs] | |
[babashka.process :as proc] | |
[clojure.string :as string])) | |
(defmacro ensure! |
OlderNewer