Skip to content

Instantly share code, notes, and snippets.

Antonin Hildebrand darwin

Block or report user

Report or block darwin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View btcd-debug-log-after-some-time.txt
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
#!/usr/bin/env bash
clj -Srepro -m cljs.main -co @compiler-opts.edn -c repro
darwin /
Last active Nov 28, 2018
Repro for CLJS-2993


clj -Srepro -Sdeps '{:deps {github-darwin/gist-2298be76f15a2be3f0ffe3252c3afcb8 {:git/url "" :sha "e654a965e69ae1c51abb07a1c1a7c165759357f2"} org.clojure/clojurescript {:git/url "" :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 "" :sha "e654a965e69ae1c51abb07a1c1a7c165759357f2"} org.clojure/clojurescript {:git/url "" :sha "b5e8dbd3316b0119ec3b80a73511127e678ce482"}}}' -m cljs.main -co @compiler-opts.edn -co '{:output-dir "out-good"}' -c repro
darwin / state_monad.clj
Created Oct 28, 2018
My quick stab at state monads in Clojure
View state_monad.clj
(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:
; 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.
darwin / deps.edn
Last active Oct 10, 2018
clojure -Srepro -Sdeps '{:deps {issue {:git/url "" :sha "af929e906525703509a4f86ba371d74f8338dc71"}}}' -m main
View deps.edn
{:paths ["."]
:deps {metosin/spec-tools {:mvn/version "0.7.2"}
org.clojure/test.check {:mvn/version "0.9.0"}
org.clojure/clojure {:mvn/version "1.9.0"}}}
darwin /
Last active Sep 29, 2018
[SOLVED] iMac sleep/wake issues caused by my USB mouse (Wake reason: XHC1)

Wake reason: XHC1

Since macOS High Sierra (maybe even Sierra) I started having trouble putting my iMac (mid 2015) to sleep. After installing clean Mojave system the problem didn't go away, even after jumping through various hoops and trying to disable every software which might be causing it.

The problem

After entering sleep mode the computer did DarkWake unexpectedly. Usually within one minute after sleeping. This was especially annoying because my external drives would spin up at that point.

The solution

darwin /
Last active Oct 25, 2018
How to inject TotalFinder via a Terminal command under macOS 10.14 Mojave (B6). First install latest TotalFinder beta from
sudo tccutil reset AppleEvents
osascript -e "tell application \"Finder\" to «event BATFinit»"
View reset.applescript
tell application "System Preferences"
reveal anchor "Privacy_Assistive" of pane id ""
display alert "RESET ACCESSIBILITY APPROVAL LIST" message "This script will reset (clear) the list of applications in the Accessibility section of the Privacy system preference pane." & linefeed & linefeed & "This action requires an administrative password, and cannot be undone." as critical buttons {"Cancel", "Reset"} cancel button "Cancel"
set show all to true
darwin / project.clj.edn
Last active Jun 12, 2018
`git clone && cd cljs-devtools && lein pprint`
View project.clj.edn
"A collection of Chrome DevTools enhancements for ClojureScript developers.",
:compile-path "/Users/darwin/code/cljs-devtools/target/classes",
{:url "",
:password :gpg,
:username :gpg,
:creds :gpg}]),
:group "binaryage",
darwin /
Last active Mar 20, 2018
This script quits Finder, moves it's plist to `/tmp/` and then launches Finder again. This should effectively reset Finder into factory defaults. Please open `/Applications/Utilities/` and execute this line-by-line.
osascript -e "tell application \"Finder\" to quit"
mv ~/Library/Preferences/ /tmp
osascript -e "tell application \"Finder\" to launch"
You can’t perform that action at this time.