Skip to content

Instantly share code, notes, and snippets.

Tim McCormack timmc

Block or report user

Report or block timmc

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
timmc / gist:d95b90336dfc63881a4034fef436c6e1
Created May 3, 2018
Passphrase compound collision - case analysis
View gist:d95b90336dfc63881a4034fef436c6e1
- 3 word passphrases
- 1000 word list, with one collision: dog, under, underdog
under dog x: 1000
x under dog: 1000
Total loss: 2 * 1000 out of 1000^3
View gist:55c8e488533e04f34efea3ef8de1f00c
timmc / crash-imagemagick.svg
Last active May 6, 2017
segfaults imagemagick when `convert crash.svg out.jpg`
View crash-imagemagick.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
timmc / gist:1c3fa7504f8abba5f7855e2acee83e5f
Last active Apr 5, 2017
Remove LJ user agreement modal - Adblock Plus filter list
View gist:1c3fa7504f8abba5f7855e2acee83e5f
[Adblock Plus 1.1]
! Remove LJ user agreement modal
! Expires: 2 days (update frequency)
! Moved to
View five.log
freenode/#clojure on 2014-04-21:
amalloy sets 5 to be 2 using reflection, probably in PM with clojurebot:
(let [field (nth (.getDeclaredFields Long) 3)] (.setAccessible field true) (.set field 5 2))
19:10 < amalloy> justin_smith: i think ''lovecraft should contain (alter-var-root #'defmacro (constantly (fn [& args] `(quote ~(rand-nth '#{various lovecraftian horrors|)))))
19:11 < justin_smith> ouch
19:11 < amalloy> or something like it, anyawy
19:11 < justin_smith> yeah
# Create and sign a JWT token with ES256 given the path to an ECDSA
# private key and a JSON payload.
# $0 path/to/keypair.der '{"JSON": "payload"}'
# Example keypair creation:
# openssl ecparam -name prime256v1 -genkey -noout -outform DER > example-keypair.der
# A few tips for generating the payload:
# - Pipe raw strings through `jq --raw-input .` to encode them as
timmc /
Last active Jan 20, 2017
bisect and lein template
lein clean
lein trampoline compile || {
echo "Build failed."
exit 125
timmc / o-sc-reduce.clj
Last active Dec 19, 2016
Short-circuiting reduce with RxJava
View o-sc-reduce.clj
(require '[rx.lang.clojure.core :as rx])
(defn o-sc-reduce
"Perform a short-circuiting reduce on a series of Observables.
Reduces the series of Observables using the reduction function `f`,
starting the accumulator with `init`. Inputs to the reduction are
provided by subscribing to the input Observables serially, similar to
concat. If at any point (including the initial value) the accumulator
satisfies `final?`, emit the accumulator, complete, and do not

Port-forwarding JMX

Proof of concept:

  • Terminal 1:
    • SSH to remote host
    • Start a Java process with JMX registry port 50004, RMI callback port 50005, and RMI hostname pinned to localhost: java -Djava.rmi.server.hostname=localhost -cp /some/jar/file main.class
  • Terminal 2:
View gist:cbf503895f08dc39f3bc471aaa5e068a
Have the following been addressed in the branch, if appropriate?
- Tests (unit, API, integration)
- Docs (both in source and in docs directory, and in public docs if separate)
- Changelog
- Compatibility with previous versions (calls, shared files or DBs, data formats -- backward and forward compatibility)
- Rollback friendly?
- Feature switches?
You can’t perform that action at this time.