Here is an overview of the work I did per project. During this period I focused mostly on a new babashka release, v0.2.0. Most of the issues worked on in sci also end up in babashka.
- Allow resources to be read from jar files #528
(ns clipboard.core | |
(:require [fipp.edn :as fipp]) | |
(:import (java.awt.datatransfer DataFlavor Transferable StringSelection) | |
(java.awt Toolkit) | |
(java.io StringWriter)) | |
(defn get-clipboard | |
"get system clipboard" | |
[] | |
(-> (Toolkit/getDefaultToolkit) |
#!/usr/bin/env -S clj -Sdeps '{:deps {clj-http/clj-http {:mvn/version "3.11.0"} cheshire/cheshire {:mvn/version "5.10.0"}}}' | |
(require '[clj-http.client :as http]) | |
(require '[cheshire.core :as json]) | |
(require '[clojure.pprint :refer [pprint]]) | |
(let [url (or (first *command-line-args*) "https://httpbin.org/get?q=a") | |
{:keys [body headers]} (http/get url)] | |
(pprint headers) | |
(pprint (json/decode body))) |
#!/usr/bin/env bb | |
(require '[clojure.java.io :as io]) | |
(require '[bencode.core :refer [read-bencode]]) | |
(require '[clojure.walk :refer [prewalk]]) | |
(require '[clojure.pprint :refer [pprint]]) | |
(import 'java.io.PushbackInputStream) | |
(defn bytes->strings [coll] | |
(prewalk #(if (bytes? %) (String. % "UTF-8") %) coll)) |
(ns space-ui.bem | |
"Add modifiers to CSS classes as in BEM method. | |
See rationale here: http://getbem.com/naming/ | |
For BEM with elements see: https://github.com/druids/ccn | |
Compared to CCN this gist supports maps." | |
(:require [clojure.string :as str])) | |
(ns utils.re-frame | |
(:require [cljs.compiler :as cljsc])) | |
(defn- anonymous-function-declaration? [form] | |
(and (list? form) | |
(= 'fn (first form)) | |
(vector? (second form)))) | |
(defn- query-id->js-fn-name [query-id] | |
(let [ns-part (when-let [ns-part (namespace query-id)] |
;; UPD hey, I'm not sure now if those zones are correct throughout the year | |
;; see this https://www.creativedeletion.com/2015/01/28/falsehoods-programmers-date-time-zones.html | |
;; Sorry for misleading you | |
[{:option/value "Pacific/Tarawa" :option/label "(GMT +12:00) Tarawa"} | |
{:option/value "Pacific/Auckland" :option/label "(GMT +12:00) New Zealand Time"} | |
{:option/value "Pacific/Norfolk" :option/label "(GMT +11:00) Norfolk Island (Austl.)"} | |
{:option/value "Pacific/Noumea" :option/label "(GMT +11:00) Noumea, New Caledonia"} | |
{:option/value "Australia/Sydney" :option/label "(GMT +10:00) Australian Eastern Time (Sydney)"} | |
{:option/value "Australia/Queensland" :option/label "(GMT +10:00) Australian Eastern Time (Queensland)"} | |
{:option/value "Australia/Adelaide" :option/label "(GMT +9:30) Australian Central Time (Adelaide)"} |
(defn in? [vs ls] | |
(boolean (some (partial (set vs)) ls))) | |
(in? [1 2] [3 4 2 5]) => false | |
(in? [1 2] [3 1 4 2 5]) => true | |
(defn in? [v ls] | |
(loop [[x & rs] ls] | |
(if-not x |
#!/usr/bin/env spire | |
;; spin up a digital ocean droplet | |
;; build latest acmetool | |
;; patch and update debian package | |
;; download acmetool binary and new package | |
;; destroy droplet | |
;; requirements: | |
;; spire 0.1.0-alpha.15 or above |
#!/usr/bin/env bb | |
(if *command-line-args* | |
(def in (str (first *command-line-args*))) | |
(do | |
(println "Which bin to run?") | |
(def in (str *input*)))) | |
(println "Watching" "*.zig" "->" (str "./" in)) |