Skip to content

Instantly share code, notes, and snippets.

View onetom's full-sized avatar

Tamas Herman onetom

View GitHub Profile
@onetom
onetom / keybase.md
Created August 4, 2017 17:01
keybase.md

Keybase proof

I hereby claim:

  • I am onetom on github.
  • I am onetom (https://keybase.io/onetom) on keybase.
  • I have a public key ASBt3f5yrZQatmEs5FIoairtyd6XqVBSZjuxeZzrfcLCdQo

To claim this, I am signing this object:

@onetom
onetom / Ethereum address
Created November 9, 2017 03:02
Rinkeby address
fb7e3403a9651a72b18c82b485fe4d935a7810b7
@onetom
onetom / Vivaldi-100%cpu-crash-report.txt
Created June 26, 2019 04:36
Vivaldi 100% CPU usage crash report
Process: Vivaldi [38254]
Path: /Applications/Vivaldi.app/Contents/MacOS/Vivaldi
Identifier: com.vivaldi.Vivaldi
Version: 2.6.1566.44 (2.6.1566.44)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Vivaldi [38254]
User ID: 501
Date/Time: 2019-06-26 12:25:27.944 +0800
@onetom
onetom / better-deftest.clj
Last active October 27, 2022 18:58
Monkey-patch Kaocha to print Cursive-recognisable stack traces & more readable `nubank/matcher-combinators` diffs
;; Discussion: https://clojurians.slack.com/archives/C0744GXCJ/p1666889779101459
(ns demo.better-deftest
(:require [clojure.test :refer :all]))
(deftest default-stack-trace-test
(is (throw (Exception. "BAMM"))))
(clojure.test/run-test default-stack-trace-test)
@onetom
onetom / dialog.clj
Created June 30, 2023 17:49
Pop up an Apple Script Yes/No dialog from Clojure
(ns dialog
"Display a Yes/No dialog, which appears on the very top of every app and grabs
the focus and also gives it back to the REPL, after making the choice, unlike
a Swing dialog, for example.
It's useful for confirming irreversible operations, like file or DB deletion.
It uses AppleScript, so it only works on macOS and on a local REPL."
(:require
[clojure.java.shell :as shell]))
@onetom
onetom / common.cljc
Created September 3, 2024 07:56
Probe in Clojure
(ns common
"This namespace was made to provide utilities, which would be used often enough
in both clj & cljs, but they are either not available in `clojure.core`
& `cljs.core` OR they are available slightly differently and this namespace
allows writing code with less reader-conditionals."
(:require
[medley.core :as medley]
#?@(:cljs
[[oops.core :refer [gcall]]
;; https://martinklepsch.org/posts/requiring-closure-namespaces.html