This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'deferred) | |
(require 'request) | |
(setq xyzzy (deferred:$ | |
(deferred:next | |
(lambda () (message "test"))) | |
(deferred:nextc it | |
(lambda (x) (message "nextc: %s" x))))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; to generate an animated spinner | |
;; | |
;; starting from from this: | |
;; ".oO@Oo." | |
;; | |
;; and producing this: | |
;; ["[ ]" | |
;; "[. ]" | |
;; "[o. ]" | |
;; "[Oo. ]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>org.gnu.emacs-daemon</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/usr/local/bin/emacs</string> | |
<string>--fg-daemon</string> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; from #clojurians with thanks to @noisesmith for posting | |
;; note: all namespaces must be loaded in repl | |
(->> (all-ns) | |
(mapcat ns-publics) | |
(filter (comp :test meta val))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; This buffer is for text that is not saved, and for Lisp evaluation. | |
;; To create a file, visit it with C-x C-f and enter text in its buffer. | |
(setq face-remapping-alist nil) | |
(with-selected-window (get-buffer-window "*eshell*") | |
(setq face-remapping-alist nil) | |
(redraw-display)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; This list was formed by clipping the version numbers from the spacelpa | |
;; and melpa-stable package names and then comparing the resulting strings. | |
;; In other words, this comparison is blind to version differences. | |
;; If a name appears here, it means spacelpa provides some version of this | |
;; package and melpa-stable has nothing, not even an older version. | |
2048-game | |
add-node-modules-path |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(setq lexical-binding t) | |
(defun cider-eval-pprint-to-multiline-comment-handler (buffer location arrow-prefix comment-prefix) | |
"Make a handler for evaluating and printing commented results in BUFFER. | |
LOCATION is the location at which to insert. | |
COMMENT-PREFIX is the comment prefix to use." | |
(cl-flet ((multiline-comment-handler (buffer value) | |
(with-current-buffer buffer | |
(save-excursion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun cider-load-buffer-and-set-ns (&optional buffer) | |
"Load buffer's file and set ns in nREPL" | |
(interactive) | |
(let ((buf (current-buffer)) | |
(ns (cider-current-ns))) | |
(cider-load-buffer buf) | |
(cider-repl-set-ns ns))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns xyz.core | |
(:require [clojure.string :refer [lower-case]]) | |
(:import java.lang.management.ManagementFactory)) | |
(defn describe-thread | |
"describe thread based on thread-info" | |
[thread-mx-bean thread-info] | |
(let [id (.getThreadId thread-info)] | |
{:id id |
NewerOlder