This file contains 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
https://gist.github.com/anonymous/1d97377be54fd02da8b050783cfbf2ad | |
#+BEGIN_SRC | |
#lang racket | |
(define (run-gs-command repo) | |
(with-output-to-string | |
(thunk | |
(system | |
(format "cd ~s; git status -s" repo))))) |
This file contains 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
(eval-after-load 'dired | |
'(progn | |
;; use the standard Dired bindings as a base | |
(defvar dired-mode-map) | |
(evil-make-overriding-map dired-mode-map 'normal) | |
(evil-add-hjkl-bindings dired-mode-map 'normal | |
"J" 'dired-goto-file ; "j" | |
"K" 'dired-do-kill-lines ; "k" | |
"r" 'dired-do-redisplay ; "l" | |
;; ":d", ":v", ":s", ":e" |
This file contains 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 embiggen-steve () | |
(interactive) | |
(set-face-attribute 'default nil :height 170)) | |
(defun not-steve () | |
(interactive) | |
(set-face-attribute 'default nil :height 125)) | |
(global-set-key (kbd "s-e") 'embiggen-steve) | |
(global-set-key (kbd "s-E") 'not-steve) |
This file contains 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
src/main.rs:73:25: 73:30 error: cannot move out of captured outer variable in an `Fn` closure | |
src/main.rs:73 do_log_time(thing, Some(thing)) | |
^~~~~ | |
<nickel macros>:1:1: 1:27 note: in expansion of as_block! | |
<nickel macros>:10:12: 10:42 note: expansion site | |
note: in expansion of closure expansion | |
<nickel macros>:9:6: 10:54 note: expansion site | |
<nickel macros>:1:1: 10:62 note: in expansion of _middleware_inner! | |
<nickel macros>:4:1: 4:60 note: expansion site | |
<nickel macros>:1:1: 7:46 note: in expansion of middleware! |
This file contains 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
;; -*- lexical-binding: true; -*- | |
(defun kernel--make-vau (params env body-exprs) | |
(list '%Vau params env body-exprs)) | |
(defun kernel--vau-params (vau) (nth 1 vau)) | |
(defun kernel--vau-env (vau) (nth 2 vau)) | |
(defun kernel--vau-body (vau) (nth 3 vau)) | |
(defun kernel--type (thing) |
This file contains 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 kernel--zip (a b) | |
(if (or a b) | |
(cons (cons (car a) | |
(car b)) | |
(kernel--zip (cdr a) | |
(cdr b))) | |
nil)) | |
(kernel--zip '(1 2 3) '(4)) |
This file contains 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
team([]). | |
team([Pokemon|Team]) :- pokemon(Pokemon), \+ member(Pokemon, Team), team(Team). |
This file contains 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 jnm/single-command-outside-of-term-mode () | |
(interactive) | |
(cl-flet ((do-cmd () | |
(call-interactively (key-binding (read-key-sequence "key sequence: "))))) | |
(if (term-in-line-mode) | |
(do-cmd) | |
(term-line-mode) | |
(do-cmd) | |
(term-char-mode)))) |
This file contains 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
:- dynamic foo/1. | |
['simple-data.prolog']. | |
save :- tell('simple-data.prolog'), listing, told. |
This file contains 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
git-on-branch () { | |
git stash | |
ORIGINAL_BRANCH=`git branch | grep \* | sed 's/\*[[:space:]]//'` | |
git checkout $1 | |
$2 | |
git checkout $ORIGINAL_BRANCH | |
git stash pop | |
} |