Key | Action |
---|---|
cpp | Evaluate the form under the cursor |
K | Look up the symbol under the cursor with (doc) |
[ d | Look up the symbol under the cursor with source |
[ Ctrl+D | Jumps to the definition of a symbol |
gf | "go to file" command, works on namespaces. |
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
# In your python env, run `make install` to install required packages | |
# and then either `make` for a single test run | |
# or `make watch` for a continuous pipeline that reruns on changes. | |
# | |
# Comments and/or hate mail to o@tman.me | |
.SILENT: test install upgrade watch checks | |
test: checks | |
pytest |
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
( | |
go | |
lua | |
csv | |
sql | |
typescript | |
crystal | |
ruby | |
(clojure | |
:variables clojure-enable-fancify-symbols t |
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
import os | |
import time | |
import datetime | |
from datetime import timedelta | |
from terminaltables import SingleTable | |
from colorclass import Color | |
FIVE_MINS = timedelta(minutes=5) |
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
(comment "repl experiments" | |
(do ; run this block to repeatably run the test | |
(use 'your-ns :reload-all) | |
(require '[eftest.runner :refer [run-tests find-tests]]) | |
(run-tests (find-tests 'your-ns.your-test) | |
{:report eftest.report.pretty/report}))) |
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
(defmacro conditional-run | |
"" | |
[conditional form] | |
`(when (= conditional true) | |
(-> test-system ~form))) | |
(defmacro conditional-run-with-prepend | |
"" | |
[conditional form] | |
`(when (= conditional true) |
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
help: prerequisites | |
@echo "Usage: make [command]" | |
@echo "Commands:" | |
@echo "up Run server" | |
@echo "stop Stop server" | |
@echo "rebuild Rebuild docker image (when requirements change)" | |
@echo "ps Show running server" | |
@echo "" | |
@echo "Commands can be chained, for example: make up ps logs" | |
@echo "" |
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
" Install vim-plug first | |
" curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs \ | |
" https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
" vim-plug {{{ | |
call plug#begin() | |
" Visual marks | |
Plug 'kshenoy/vim-signature' |
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
<html> | |
<head> | |
</head> | |
<body> | |
<script type='text/javascript' src='https://darksky.net/widget/default/53.137156,-1.551774/uk12/en.js?width=100%&height=350&title=matlock, uk&textColor=333333&bgColor=FFFFFF&transparency=false&skyColor=333333&fontFamily=Default&customFont=&units=uk&htColor=333333<Color=C7C7C7&displaySum=no&displayHeader=yes'></script> | |
</body> | |
</html> |
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
from functools import reduce | |
def thread(*args): | |
""" | |
Functional thread ->, inspired by clojure and https://stackoverflow.com/a/17122666/333294 | |
Toy example that only works for functions or airity 1 | |
""" | |
caller = lambda x, y: y(x) | |
return reduce(caller, args[1:], args[0]) |