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
function! VO2MD() | |
let lines = [] | |
let was_body = 0 | |
for line in getline(1,'$') | |
if line =~ '^\t*[^:\t]' | |
let indent_level = len(matchstr(line, '^\t*')) | |
if was_body " <= remove this line to have body lines separated | |
call add(lines, '') | |
endif " <= remove this line to have body lines separated | |
call add(lines, substitute(line, '^\(\t*\)\([^:\t].*\)', '\=repeat("#", indent_level + 1)." ".submatch(2)', '')) |
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
" Sort shortcuts | |
vnoremap <silent> <Leader>S :sort<CR> | |
nnoremap <silent> <Leader>S :sort<CR> |
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
function! CleanSpell() | |
runtime spell/cleanadd.vim | |
endfunction |
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
# Alias to `cd` for best effect | |
change() { | |
cd "$1" | |
clear | |
ls -al | |
} |
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
# Usage: defer file1 [file2] [...] date | |
function defer () { | |
date=${*: -1} | |
folder="$DEFERRED/$date" | |
for i in "$@"; do | |
if [ "$i" != "$date" ]; then | |
mkdir -p "$folder" && mv "$i" "$folder/$i" | |
fi |
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
:%s/\v(\$\w+)/"\1"/g |
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
defmodule Times do | |
def double(n) do | |
n * 2 | |
end | |
def triple(n) do | |
n * 3 | |
end | |
def quadruple(n) do |
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
#!/usr/bin/env elixir | |
System.cmd("open", ["sticky-notifications://note?message=#{System.argv}"]) |
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
function spec () { | |
if [[ -d spec ]]; then | |
clear | |
rspec | |
else | |
echo "\033[1;31m\n No Rspec directory found! \033[0m" | |
return 1 | |
fi | |
} |
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
property usesFlagsForScheduling : false -- true or false, true flags any tasks that the script runs on | |
property methodForScheduling : "Start" -- Options are "Start", "Due", or "Start and Due" | |
property useGrowlForAlerts : true -- true or false | |
property promptForUserOptions : false -- will change after first run | |
global setToTomorrow | |
# Checks to see if it's after 5pm | |
set setToTomorrow to false | |
if hours of (current date) ≥ 17 then | |
set setToTomorrow to true |