Skip to content

Instantly share code, notes, and snippets.

@gregoryg
gregoryg / kudo-demo-sheet.org
Created November 22, 2019 20:51
Sequence to use for a KUDO Meetup

kudo-cheatsheet

@gregoryg
gregoryg / mergesort.clj
Last active August 29, 2015 14:10 — forked from alco/mergesort.clj
(defn merge-seqs
"Merges two sorted sequences into a single sorted sequence"
([left right]
(merge-seqs (list left right)))
([[left right]]
(loop [l left, r right, result []]
(let [lhead (first l), rhead (first r)]
(cond
(nil? lhead) (concat result r)
(nil? rhead) (concat result l)
(setq confirm-kill-emacs 'y-or-n-p) ;; confirm to exit emacs
;; dippy bird FTW
(fset 'yes-or-no-p 'y-or-n-p)
(temp-buffer-resize-mode 1) ;; crazy cool
;; very important: keep a long list of yow lines
(setq yow-file "~/emacs/yow.lines")
;; almost as important: keep track of those tetris scores
(setq tetris-score-file "~/.emacs.d/tetris.score")
(global-set-key [home] (lambda () (interactive) (goto-char (point-min))))
@gregoryg
gregoryg / dtl-indent-line.el
Created June 13, 2014 20:08
First indentation code for Syncsort DTL
;; /DTL and /END are indent level 0
;; default for everything following a /DTL is indent level 1
;; if { appears in a previous line without a closing }, cur-indent += 1
;; if } appears in current line without an opening {. cur-indent -= 1
;; TODO: line continuations should indent past command (?)
(defun dtl-indent-line ()
"Indent current line as DTL code."
(interactive)
(beginning-of-line)