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
import java.nio.ByteBuffer | |
import java.util.UUID | |
fun UUID.asBytes(): ByteArray { | |
val b = ByteBuffer.wrap(ByteArray(16)) | |
b.putLong(mostSignificantBits) | |
b.putLong(leastSignificantBits) | |
return b.array() | |
} |
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
T31EVTnss(pnhUDb2eW3p(t5y7eJylNZuzMDWzygkjkjUHIuljvC0EyYN9RQQFWMVKPDCMjz3maZmYsn7U6QRUQF1JU5D63n7UGDf5RssJXpM)P4IO00WfPXrfHzX3xLxSEtuz1DNCxWIODv7lIdlIJsXgVb))W3xUlonDbVrBtkxSmQkc)C0(c6)hNfxS(a(PLrBJwhdFQ6UGI87dxfTmomjd6TP63faFyQXDt1EPb(77sJoexeUmUkkjTm8(KSL53JJB5IiGAXhO8JWJeCw6NE)f3fmhO4Q4pJK4DbbF8qAswm2p48H1xLHra5VUiF)U7MFxW(syUaeruwY2OQK8SsKelI3LxufItUqOl(yj2u2GxYO389vCcg)KcfVnb6P9BdLCX8TZJQcRs2IKRgm9JJQ2ewLNNwLSdMrlR2C3utBn5OwLhE)M87caMDAuzziWAxuc9tEXYsCmDmyJmoI26(2M6g2CkW0f(Kj(j67SyTbiRP6woUYht0ChdrZfn2H1AhtzBPU0G3ME7AdG25TM3sDr)YBNUOH6YUTMMhQTQZY2tVMTfMBEYg7iBT7atod76zNhF2P3pnyn0eRhMG9rMBDAUJZXATSX4eM68JT21T1kCdtdp9UCKUpIV8rKR3Ed3ChTH4GDARTR7rwi7S2OiC3dJHEol2ZH9TN(rKt701whPXT6zdh7JWX70yNJj(1P1UhJx3P1hv0UJyOJ)GRmDARR2XiK2nxP1dR2P9QVUMXWm9M72C1hKYBXt01mhEXPvNAm4o4wIh6AwhHr3wHJR5XyDT6ALg3JmDhXuZJTFPdRW(iesl1zo6dYmAl1z7CK9kTxKR3R0PF70uRJSTQLexfAaeHGSpJmxhVennJgSbdQvPX4xMTmSmUam1gUlQa(eANEhyIF(8I4pLqg0Xop4(8I0LcBXjLHvfrLBOg)PDHrLC8aq3ppp)JBJk(iHIiSm5FHwTbR8s8bO544LHGzEOp(uCksUw23fa)1IpgMufVnmng)EOZjKcu7PPNDBJ |
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
(require | |
'[clojure.edn :as edn] | |
'[clojure.java.io :as io] | |
'[clojure.string :as str]) | |
(defn read-workspace | |
([] (read-workspace ".")) | |
([ws-dir] | |
(-> ws-dir |
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
#!/usr/bin/env bash | |
run() { | |
while :; do | |
unset REPLY | |
printf %s "run $*? [Y/n/q] " > /dev/tty | |
read -r REPLY < /dev/tty | |
case ${REPLY:-y} in | |
[yY]*) | |
if ! "$@"; then |
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 c4.alpha | |
"A library for [C4 model](c4model.com)") | |
(declare rel) | |
(defrecord Shape [label description sprite tags link]) | |
(def ^:dynamic *boundaries* (list)) | |
(def ^:private hierarchy |
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 openmoji | |
(:require | |
[clojure.string :as str] | |
[clojure.data.csv :as csv] | |
[clojure.java.io :as io] | |
[babashka.fs :as fs] | |
[babashka.curl :as curl] | |
[clojure.string :as str])) | |
(defn download-data |
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
aliases: | |
pv: pr view --web | |
land: pr merge --squash --delete-branch | |
config-export: '!cat ~/.config/gh/config.yml | jq --raw-input --slurp -r "{files: {\"config.yml\": {content: .}}}" | gh api -X PATCH /gists/ba5517759522578585830221e88c1658 --input - | jq .html_url | xargs open' | |
clone: |- | |
!mkdir -p "${CODE}/$1" && gh repo clone "$1" "${CODE}/$1" | |
v: repo view --web |
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 ^:private inf (Long/MAX_VALUE)) | |
(defn neighbors | |
"Returns n's neighbors, optionally filtered if unvisited" | |
([g n] (get g n {})) | |
([g n uv] (select-keys (neighbors g n) uv))) | |
(defn update-costs | |
"Returns costs updated with any shorter paths found to curr's unvisisted | |
neighbors by using curr's shortest path" |
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
intervalId = setInterval(function() { | |
els = Array.from( | |
document.getElementsByClassName("c-virtual_list__item") | |
).filter( | |
(el) => el.innerText.includes(":azure_") | |
) | |
console.log("Matches found:", els.length) | |
if (!els.length) { | |
clearInterval(intervalId) |
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
SPC s c remove highlight | |
**** Files manipulations key bindings | |
Files manipulation commands (start with ~f~): | |
| Key Binding | Description | | |
|-------------+----------------------------------------------------------------| | |
| ~SPC f c~ | copy current file to a different location | | |
| ~SPC f C d~ | convert file from unix to dos encoding | | |
| ~SPC f C u~ | convert file from dos to unix encoding | |
NewerOlder