Skip to content

Instantly share code, notes, and snippets.

Jake McCrary jakemcc

Block or report user

Report or block jakemcc

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 weird.clj
qqq.core> (require '[ :as shell])
;; Kick off a future that is reading System/in and just print the result
qqq.core> (future
(println (.read System/in))
(println "done"))
#<Future@536d8f5e: :pending>
;; Invoke something that uses /bin/sh, see the output
jakemcc /
Created Jul 15, 2016
Inspector example for reagent and re-frame


root function is what gets added to our markup for the page. q/db is a query that just returns our entire re-frame db.


Some example styling for the inspector.

View bash function
# one line for easy copy and pasting to terminal.
function newyezzy { curl -s$1 | sed 's/.*\<h2>\(.*\)<.*<div id="sourceinfo".*/\1/' | head -n 1; }
jakemcc / project.clj
Created Nov 4, 2013
Modified to work with lein-test-refresh. `lein-protobuf` depends on an old version of `leinjacker` which has too strict of constraints for modern Leiningen versions.
View project.clj
(defproject revise "0.0.2"
:description "RethinkDB client for Clojure"
:url ""
:license {:name "Eclipse Public License"
:url ""}
:main bitemyapp.revise.core
:plugins [[lein-protobuf "0.3.1" :exclusions [leinjacker]]
[lein-difftest "2.0.0"]
[com.jakemccrary/lein-test-refresh "0.1.2"]]
:test-selectors {:default (fn [_] true) ;; (complement :integration)
jakemcc / gist:3887459
Created Oct 14, 2012
Set your emacs path from your shell's $PATH
View gist:3887459
(defun set-exec-path-from-shell-PATH ()
(let ((path-from-shell (shell-command-to-string "$SHELL -i -c 'echo $PATH'")))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-from-shell path-separator))))
(if window-system (set-exec-path-from-shell-PATH))
jakemcc / _readme.txt
Created Sep 21, 2012
Resharper 7 C# Type Members Layout that gets rid of auto putting sections in regions.
View _readme.txt
Having Resharper auto put code into #regions is annoying.
To stop this, open Resharper options, then C# > Type Members Layout.
Uncheck "Use Default Patterns" and past xml into it.
jakemcc / gist:1010159
Created Jun 6, 2011
pop-up multi-monitor
View gist:1010159
<input type="button" onclick=",'myWindow','height=300,width=300,menubar=no,status=no,left=3000').focus();return false;" value="Try it">
View gist:226340
// No issues with this
private static class DecimalsRecordLayout extends CobolRecordLayout {
public DecimalsRecordLayout() {
field("Price", "9(5)");
field("Quantity", "99v999");
field("Other", "999v99");
jakemcc / clj
Created Oct 7, 2009
script to run Clojure
View clj
#!/usr/bin/env bash
java -cp $HOME/opt/clojure/jars/jline.jar:$HOME/opt/clojure/jars/clojure-contrib.jar:$HOME/opt/clojure/jars/clojure.jar jline.ConsoleRunner clojure.main $*
jakemcc /
Created Oct 7, 2009
Bash script which setups a simple clojure environment in $HOME/opt/clojure
#!/usr/bin/env bash
mkdir -p $CLOJURE_DIR
# Get latest version of clojure and compile it
git clone git://
cd clojure
You can’t perform that action at this time.