Skip to content

Instantly share code, notes, and snippets.

View jeremyheiler's full-sized avatar

Jeremy Heiler jeremyheiler

View GitHub Profile
@qtrfeast
qtrfeast / Editing Clojure with Emacs
Last active July 5, 2022 13:32
Get started editing Clojure in Emacs with this basic config.
Check out README.md to get started editing Clojure with Emacs.
@hiredman
hiredman / scratch.clj
Created March 9, 2013 02:02
parallel require
(alter-var-root #'require
(fn [o-require]
(fn [& args]
(let [{opts true nses false} (group-by keyword? args)]
(doall
(map #(.join %)
(doall
(for [ns nses]
(doto (Thread. #(apply o-require ns opts))
.start)))))))))
@CampingScorpion
CampingScorpion / gist:4134522
Created November 23, 2012 08:27
doseq-indexed
;; Example:
;; (doseq-indexed idx [name names]
;; (println (str idx ". " name)
(defmacro doseq-indexed [index-sym [item-sym coll] & body]
`(let [idx-atom# (atom 0)]
(doseq [~item-sym ~coll]
(let [~index-sym (deref idx-atom#)]
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active July 26, 2025 16:29
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active August 4, 2025 14:30
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@unclebob
unclebob / commatize
Created February 7, 2012 17:44
A function to format a number with commas
(defn commatize [n]
(if (nil? n)
""
(let [s (str n)]
(apply str
(reverse (drop-last
(interleave
(reverse s)
(take (count s) (flatten (repeat [nil nil \,]))))))))))
@drj42
drj42 / org-mode-reference-in.org
Created February 6, 2012 23:53
This is a cheat sheet for Emacs org-mode... in org-mode format!
(defn map-keys [f m & [ks]]
(loop [new-map (transient {}) ks ks]
(if (empty? ks)
(persistent! new-map)
(let [[k & ks] ks]
(recur (assoc! new-map k (f (m k))) ks)))))