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
(use 'clojure.test) | |
(deftest tracing-paths | |
(testing "trace-paths" | |
(is (= (trace-paths {:a nil} :a) | |
[[:a]])) | |
(is (= (trace-paths {:a #{:b} | |
:b nil} :a) |
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
{ | |
"*" : { | |
"start" : "lein repl", | |
}, | |
"src/*.clj": { | |
"command": "namespace", | |
"alternate": "test/{}_test.clj", | |
"template": "(ns {dot|hyphenate})\n\n" | |
}, | |
"test/*_test.clj": { |
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
function! s:brepl(remove) abort | |
if a:remove | |
call fireplace#platform().piggieback("", 1) | |
echo "Piggieback connection removed" | |
else | |
let form = '(do ' . | |
\ '(require ''adzerk.boot-cljs-repl)' . | |
\ '(let [env (adzerk.boot-cljs-repl/repl-env)]' . | |
\ ' (Thread/sleep 100)' . | |
\ ' env))' |
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
# Switch back to system just to make sure | |
rvm use system | |
# Print a list of all gems installed on the system | |
gem list | awk '{print $1}' > gems.txt | |
# Switch to the new version of ruby | |
rvm use ree | |
# Install each gem from the list, skipping documentation |
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
def self.up | |
if connection.tables.include?('posts') | |
drop_table :posts | |
end | |
end |
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
function! s:ToggleDoEndOrBrackets() | |
let char = getline('.')[col('.')-1] | |
if char =~ '[{}]' | |
if char=='}' | |
norm % | |
endif | |
norm h | |
" Bracket touching previous word | |
if getline('.')[col('.')-1] =~ '[^ ;]' | |
exe "norm! a " |
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
#compdef hitch | |
__hitch_authors() { | |
local expl | |
local -a _authors | |
if [ -f $HOME/.hitch_pairs ]; then | |
_authors=(${${(f)"$(cat $HOME/.hitch_pairs | awk '/:/ { print }')"}/:[ $'\t']##/:}) | |
fi | |
_describe -t hitch-authors 'hitch authors' _authors "$@" | |
} |
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
#!/usr/bin/env ruby | |
# Adapted from https://gist.github.com/946311 | |
# | |
# To use, put something like the following in your .bashrc.local: | |
# | |
# alias harvest='rvm use 1.9.2@harvester;harvester;cd ..;cd -' | |
author = `git config --global user.name`.chomp |
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
[alias] | |
add-untracked = !"git status --porcelain | awk '/\\?\\?/{ print $2 }' | xargs git add" |
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
#!/usr/bin/env bash | |
if [ -n "$(git status --porcelain)" ]; then | |
echo "ERROR: You have a dirty working copy. This command would remove any files not already checked in" | |
exit 1 | |
fi | |
log() { | |
if [ -z "$quiet" ]; then | |
echo |
OlderNewer