Skip to content

Instantly share code, notes, and snippets.

View evilsneer's full-sized avatar
🥭

evilsneer

🥭
View GitHub Profile
@evilsneer
evilsneer / clojure sh.clj
Last active April 18, 2021 18:47
clojure sh utils
(defn- -l [host port path]
{:post [(= 0 (:exit %))]}
(->> (sh "ssh" (str user "@" host)
"-p" port
"cd" path
"&&"
"ls -l")))
(defn l-humanize [user host port path]
@evilsneer
evilsneer / wget-site-get.sh
Created December 24, 2021 15:32
wget download full site
wget --recursive --no-clobber --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains "proekt.media,proektmedia-stat.ams3.digitaloceanspaces.com" --mirror -U "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" www.proekt.media
@evilsneer
evilsneer / count-distinct-csv.bb
Last active April 15, 2022 09:53
bb csv count distinct fields
(require '[clojure.data.csv :as csv]
'[clojure.tools.cli :refer [parse-opts]])
(def cli-options
;; An option with a required argument
[["-f" "--file FILE" "File path"
; :default 80
; :parse-fn #(Integer/parseInt %)
:validate [string? "Must be a string"]]
["-h" "--help"]])