Skip to content

Instantly share code, notes, and snippets.

Sean Allred vermiculus

Block or report user

Report or block vermiculus

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 melpautil.el
;; a packagelet for figuring out where melpa is. will move point to commit in magit-log buffers.
(defun melpautil-where-is-melpa (package &optional force-refresh)
(interactive (list (intern (let-alist (magithub-repo) .name))
(let ((commit (melpautil-commit-for-package package force-refresh)))
(unless commit
(error "Commit not found"))
(setq commit (magit-rev-parse "--short" commit))
(when (derived-mode-p 'magit-log-mode)
(goto-char 0)
View github-http-500.html
<!DOCTYPE html>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; base-uri 'self'; connect-src 'self'; form-action 'self'; img-src data:; script-src 'self'; style-src 'unsafe-inline'">
<meta content="origin" name="referrer">
<title>Server Error &middot; GitHub</title>
<style type="text/css" media="screen">
body {
background-color: #f1f1f1;
View oref-start.el
;;; Neat convenience function for working with Elisp's EIEIO objects
(defmacro oref* (object &rest slots)
"Like `oref', but each slot in SLOTS is applied in sequence.
For example,
\(oref* obj :inner :property)
is equivalent to
View paranoid-errors.el
;; Show a backtrace whenever an error is encountered
(defun user-error-to-backtrace (&rest r)
(get-buffer-create "*issue*")
#'display-buffer-pop-up-window nil
(insert (kill-new (with-output-to-string (backtrace))))))
(mapc (lambda (e) (advice-remove e #'user-error-to-backtrace))
'(user-error error))
(mapc (lambda (e) (advice-add e :before #'user-error-to-backtrace))
View solution.clj
(defn get-topic-children [topics topic-id]
(map first (filter #(= topic-id (:parent (second %))) topics)))
(defn get-routes [topics topic-id & [slug-so-far]]
(let [children (get-topic-children topics topic-id)
newslug (if (= topic-id :root) ""
(str slug-so-far "/" (:slug (get topics topic-id))))]
(if children
(into (if (= topic-id :root) {} {topic-id newslug})
(map #(get-routes topics % newslug) children))
View luminus+cider-nrepl.diff
Use CIDER's nREPL handler
2 files changed, 5 insertions(+), 2 deletions(-)
project.clj | 3 ++-
src/clj/myapp/core.clj | 4 +++-
modified project.clj
@@ -55,7 +55,8 @@
[ring/ring-mock "0.3.0"]
[ring/ring-devel "1.4.0"]
# Run as sudo
if [ "$EUID" -ne 0 ] ; then
>&2 echo "Please run as sudo."
exit 1
if [ -z "$1" ] ; then
read -p "Package name: " PKG
View Makefile
test.o: test.c chunklist.c chunklist.h
gcc -o test.o test.c chunklist.c
View obj-demo.tex
\nonstopmode \input expl3-generic \relax \ExplSyntaxOn % -*- expl3 -*-
\file_input:n { obj }
\obj_new:nn { rectangle }
size: int = 2,
name: tl,
View obj-demo.tex
\nonstopmode \input expl3-generic \relax \ExplSyntaxOn % -*- expl3 -*-
\file_input:n { obj }
\obj_new:nn { rectangle }
size: int = 2,
name: tl,
You can’t perform that action at this time.