Skip to content

Instantly share code, notes, and snippets.

@ordnungswidrig
ordnungswidrig / pres.el
Created December 4, 2018 19:46
presentation helper for live demo in emacs
(defun c6e/pres-forward ()
(interactive)
(let ((saved (point)))
(forward-line)
(let ((beg (point)))
(search-forward-regexp "^;;; " nil t)
(if (= beg (point))
(goto-char saved)
(progn
(recenter 0)
(defmacro afor
"Like for but eagerly builds a JS array.
Usually for react consumption."
[[item coll] & body]
`(reduce (fn [neue# ~item]
(.push neue# (do ~@body))
neue#)
(cljs.core/array) ~coll))
(defmacro arfor
@foxxyz
foxxyz / nginx.conf
Last active March 3, 2024 10:42
Serve current directory via nginx
# Extremely basic development setup to serve the current directory at http://localhost:9001
# Start nginx in this directory with `nginx -p . -c nginx.conf`
# Stop nginx with `nginx -p . -s stop`
events {}
http {
# Serve files with correct mimetypes on OSX
# location may have to be adjusted depending on your OS and nginx install
include /usr/local/etc/nginx/mime.types;