Skip to content

Instantly share code, notes, and snippets.

> rm -rf ~/.m2/repository/binaryage/dirac/1.5.8
> clojure -Srepro -Sdeps '{:deps {binaryage/dirac {:mvn/version "1.5.8"} org.clojure/clojurescript {:mvn/version "RELEASE"} clj-logging-config {:mvn/version "1.9.12"}}}' -m dirac.main
Error building classpath. Could not find artifact binaryage:dirac:jar:1.5.8 in central (https://repo1.maven.org/maven2/)
> lein publish
All version strings are consistent: '1.5.9'
WARNING: You have $CLASSPATH set, probably by accident.
It is strongly recommended to unset this before proceeding.
Created /Users/darwin/code/dirac-ws/dirac/target/dirac-1.5.9.jar
Archive: dirac-1.5.9.jar
Length Date Time Name
--------- ---------- ----- ----
238 03-08-2020 20:04 META-INF/MANIFEST.MF
6767 03-08-2020 20:04 META-INF/maven/binaryage/dirac/pom.xml
SHADOW_ENV.evalLoad("goog.debug.error.js", false, "goog.provide(\x22goog.debug.Error\x22);\n/**\n * @constructor\n * @extends {Error}\n * @param {*\x3d} opt_msg\n */\ngoog.debug.Error \x3d function(opt_msg) {\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, goog.debug.Error);\n } else {\n /** @const */ var stack \x3d (new Error).stack;\n if (stack) {\n /** @override */ this.stack \x3d stack;\n }\n }\n if (opt_msg) {\n /** @override */ this.message \x3d String(opt_msg);\n }\n /** @type {boolean} */ this.reportErrorToServer \x3d true;\n};\ngoog.inherits(goog.debug.Error, Error);\n/** @override */ goog.debug.Error.prototype.name \x3d \x22CustomError\x22;\n
//# sourceMappingURL=data:application/json;charset=utf-8;base64,ewoidmVyc2lvbiI6MywKImZpbGUiOiJnb29nLmRlYnVnLmVycm9yLmpzIiwKImxpbmVDb3VudCI6MjMsCiJtYXBwaW5ncyI6IkFBdUJBQSxJQUFBQyxRQUFBLENBQWEsa0JBQWIsQ0FBQTtBQVVBOzs7OztBQUFBRCxJQUFBRSxNQUFBQyxNQUFBLEdBQW1CQyxRQUFRLENBQUNDLE9BQUQsQ0FBVTtBQUduQyxNQUFJRixLQUFBRyxrQkFBSjtB
diff --git a/src/main/shadow/build/output.clj b/src/main/shadow/build/output.clj
index 7218596c..481287d0 100644
--- a/src/main/shadow/build/output.clj
+++ b/src/main/shadow/build/output.clj
@@ -185,8 +185,11 @@
(let [sm-suffix
(get-in state [:compiler-options :source-map-suffix] ".map")
+ sm-prefix
+ (get-in state [:compiler-options :source-map-prefix] "")
@darwin
darwin / automate-totalfinder-tabs.applescript
Created February 3, 2020 15:34
This is a simple automation script to open two extra tabs and switch them to custom paths. Tested on macOS 10.15.3 (Catalina) and TotalFinder 1.12.3
set paths to {"/Users/darwin/Music", "/Users/darwin/Desktop"}
-- open all paths as new tabs
repeat with path in paths
set applePath to POSIX file path
tell application "Finder" to activate
tell application "System Events"
keystroke "t" using command down
end tell
delay 1
@darwin
darwin / readme.md
Last active April 9, 2024 22:30
APFS Container cloning/replicating under Catalina (with a bootable system)

Today I wanted to move existing APFS-resident macOS Catalina installation to a new disk. I upgraded my late 2014 Mac Mini with a shiny new 1TB SSD. This took way too many hours of my life I will never get back. Hope this saves some time to you.

Good news:

  1. it is possible to create a DMG image from existing APFS container with macOS Catalina installation including metadata needed for complete restore (the DMG contains OS, OS Data, Preboot, Recovery and VM volumes)
  2. it is possible to restore this DMG image into empty APFS container and get a bootable copy of the original system

This information is relevant for Catalina (I'm currently running macOS 10.15.1).

btcd | 2019-09-26 20:28:19.074 [DBG] CHAN: Added time sample of 0s (total: 175)
btcd | 2019-09-26 20:28:19.074 [DBG] CHAN: New time offset: 0s
btcd | 2019-09-26 20:28:19.508 [DBG] PEER: Cannot start peer <IP>:21611 (inbound): protocol negotiation timeout
btcd | 2019-09-26 20:28:24.671 [DBG] PEER: Cannot start peer <IP>:36080 (inbound): protocol negotiation timeout
btcd | 2019-09-26 20:28:38.217 [DBG] PEER: Sending ping to <IP>:8333 (outbound)
btcd | 2019-09-26 20:28:38.258 [DBG] PEER: Sending ping to <IP>:8333 (outbound)
btcd | 2019-09-26 20:28:38.290 [DBG] PEER: Sending ping to <IP>:8333 (outbound)
btcd | 2019-09-26 20:28:38.621 [DBG] PEER: Cannot start peer <IP>:14449 (inbound): protocol negotiation timeout
btcd | 2019-09-26 20:28:40.638 [DBG] PEER: Cannot start peer <IP>:64427 (inbound): protocol negotiation timeout
btcd | 2019-09-26 20:28:41.857 [DBG] PEER: Cannot start peer <IP>:36622 (inbound): protocol negotiation timeout
@darwin
darwin / _compile.sh
Last active January 26, 2019 15:44
fat cond
#!/usr/bin/env bash
clj -Srepro -m cljs.main -co @compiler-opts.edn -c repro
@darwin
darwin / README.md
Last active November 28, 2018 14:16
Repro for CLJS-2993

See https://dev.clojure.org/jira/browse/CLJS-2993

clj -Srepro -Sdeps '{:deps {github-darwin/gist-2298be76f15a2be3f0ffe3252c3afcb8 {:git/url "https://gist.github.com/darwin/2298be76f15a2be3f0ffe3252c3afcb8" :sha "e654a965e69ae1c51abb07a1c1a7c165759357f2"} org.clojure/clojurescript {:git/url "https://github.com/clojure/clojurescript" :sha "6cbd40f865132b8b13c6b902b715aed43e64f0b1"}}}' -m cljs.main -co @compiler-opts.edn -co '{:output-dir "out-bad"}' -c repro
clj -Srepro -Sdeps '{:deps {github-darwin/gist-2298be76f15a2be3f0ffe3252c3afcb8 {:git/url "https://gist.github.com/darwin/2298be76f15a2be3f0ffe3252c3afcb8" :sha "e654a965e69ae1c51abb07a1c1a7c165759357f2"} org.clojure/clojurescript {:git/url "https://github.com/clojure/clojurescript" :sha "b5e8dbd3316b0119ec3b80a73511127e678ce482"}}}' -m cljs.main -co @compiler-opts.edn -co '{:output-dir "out-good"}' -c repro
@darwin
darwin / state_monad.clj
Created October 28, 2018 15:35
My quick stab at state monads in Clojure
(ns experimental.state-monad
(:refer-clojure :exclude [let]))
; This is a poor man's attempt to get something like state monad.
; We could have used clojure.algo.monads, but I wanted to avoid these drawbacks:
; https://www.reddit.com/r/Clojure/comments/8pyxk8/motivation_for_monads/e0gb6on/
; Alternatively we could have used some heavy category theory library like cats or fluokitten, but
; that looked like a pretty complex thing to learn and keep in head.
; Also I want this thing to play well with Cursive.
;