Instantly share code, notes, and snippets.

View terminal.sh
sudo tccutil reset AppleEvents
osascript -e "tell application \"Finder\" to «event BATFinit»"
View reset.applescript
tell application "System Preferences"
launch
activate
reveal anchor "Privacy_Assistive" of pane id "com.apple.preference.security"
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
View project.clj.edn
{:description
"A collection of Chrome DevTools enhancements for ClojureScript developers.",
:compile-path "/Users/darwin/code/cljs-devtools/target/classes",
:deploy-repositories
(["clojars"
{:url "https://clojars.org/repo/",
:password :gpg,
:username :gpg,
:creds :gpg}]),
:group "binaryage",
View remove-finder-plist.sh
osascript -e "tell application \"Finder\" to quit"
mv ~/Library/Preferences/com.apple.finder.plist /tmp
osascript -e "tell application \"Finder\" to launch"
View totalfinder-diagnostics.md
  1. Please open /Applications/Utilities/Terminal.app
  2. In the Terminal prompt copy&paste this line and hit return:
curl -sL https://updates.binaryage.com/diagnose-totalfinder.sh | bash
  1. Please send the resulting file totalfinder-diagnostics.tar.gz (on Desktop) to support@binaryage.com
View 01_promise.cljs
(ns promise-test.core
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [cljs.core.async :refer [<! timeout chan put!]]))
(def delay-ms 100)
(defn async [n & [f]]
(go
(<! (timeout delay-ms))
((or f identity) n)))
View finder-paths.applescript
set paths to {"/Users/darwin/Music", "/Users/darwin/Desktop"}
-- initialize new Finder window
tell application "Finder"
activate
set finderWindow to make new Finder window
set toolbar visible of finderWindow to true
end tell
-- open all paths as new tabs
View lein-dev-browser-tests.txt
> lein dev-browser-tests
22:48:22 fixtures-server | launching fixtures server for development (silent mode) in '/Users/darwin/code/dirac-ws/dirac/test/browser/fixtures/resources' on port 9080
22:48:22 browser | selected browser binary '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary'
22:48:22 browser | waiting for compilation of clojurescript components...
22:48:26 fig-marion | Figwheel: Cutting some fruit, just a sec ...
22:48:26 fig-dirac | Figwheel: Cutting some fruit, just a sec ...
22:48:26 marion-cs | Watching for changes before compiling ClojureScript...
22:48:27 tests | Watching for changes before compiling ClojureScript...
22:48:29 dev-agent | Listening for transport dt_socket at address: 5005
22:48:40 marion-cs | Compiling "test/marion/resources/unpacked/.compiled/content_script/content_script.js" from ("src/empty" "src/settings" "src/shared" "test/marion/src/content_script")...
View lein-dev-dirac-sample.txt
> lein dev-dirac-sample 22:21:59 browser | selected browser binary '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary'
22:21:59 browser | waiting for compilation of clojurescript components...
22:22:01 fig-dirac | Figwheel: Cutting some fruit, just a sec ...
22:22:01 server-sample | Starting HTTP server on port 9977 => http://localhost:9977
22:22:01 fig-sample | Figwheel: Cutting some fruit, just a sec ...
22:22:01 fig-marion | Figwheel: Cutting some fruit, just a sec ...
22:22:02 marion-cs | Watching for changes before compiling ClojureScript...
22:22:11 marion-cs | Compiling "test/marion/resources/unpacked/.compiled/content_script/content_script.js" from ("src/empty" "src/settings" "src/shared" "test/marion/src/content_script")...
22:22:17 fig-sample | Figwheel: Validating the configuration found in project.clj
22:22:17 fig-sample | Figwheel: Config
View dirac-figwheel.diff
diff --git a/project.clj b/project.clj
index 55e473c..991ba3b 100644
--- a/project.clj
+++ b/project.clj
@@ -49,9 +49,7 @@
:source-map-timestamp true
;; To console.log CLJS data-structures make sure you enable devtools in Chrome
;; https://github.com/binaryage/cljs-devtools
- :preloads [devtools.preload dirac.runtime.preload]
- :external-config {:dirac.runtime/config {:agent-host "localhost"