Skip to content

Instantly share code, notes, and snippets.

View jjl's full-sized avatar

jjl

View GitHub Profile
(defn reexport [ns sym]
(cond (not (symbol? sym)) (throw (ex-info "reexport takes a symbol!" {}))
(not (namespace sym)) (throw (ex-info "reexport takes a namespaced symbol" {}))
:else
(let [v (resolve sym)]
(intern ns (-> sym name symbol (with-meta (meta v))) @v))))
@torgeir
torgeir / build.boot
Last active May 12, 2017 15:16
Figwheel boot clj setup, live reloading cljs and css
(set-env! :dependencies '[
[org.clojure/clojure "1.8.0" :scope "provided"]
[org.clojure/clojurescript "1.9.89" :scope "provided"]
[ajchemist/boot-figwheel "0.5.4-5"] ;; latest release
[org.clojure/tools.nrepl "0.2.12" :scope "test"]
[com.cemerick/piggieback "0.2.1" :scope "test"]
[figwheel-sidecar "0.5.4-5" :scope "test"]
[pandeiro/boot-http "0.7.2" :scope "test"]])
@stuaxo
stuaxo / rerun.py
Last active August 26, 2022 01:18
Re run a process if HUP is recieved.
#!/usr/bin/env python
"""
rerun - kill and rerun subprocess on recieving HUP signal.
$ rerun myproc
In another terminal restart using
$ kill rerun:myproc -HUP