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 sys | |
import os.path | |
import pickle | |
from SizeLimitedStack import * | |
PERSISTENT_FILE = os.path.expanduser('~/.persdirs') | |
def add_dir_to_stack(new_dir): | |
idx = sls.find(new_dir) | |
if idx > -1: sls.move_to_top(idx) |
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
setlocal makeprg=xcodebuild\ -configuration\ Debug | |
setlocal errorformat=%f:%l:%c:%.%#\ error:\ %m,%f:%l:%c:%.%#\ warning:\ %m,%-G%.%# | |
command! -buffer OpenFileInXCode silent !xed % | |
command! -buffer RebuildTags exec "!~/bin/ctags -R --language-force=ObjectiveC ." | |
nmap <buffer> <silent> K :exec 'silent !open "'. escape('http://www.google.com/search?q='.expand('<cword>').'&btnI=745', ' &!%').'"'<cr>:redraw!<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
#! /bin/zsh | |
# Backup script written by Greg Sexton | |
# bomb out on first non-zero exit code | |
set -e | |
trap 'echo !!! BACKUP EXITED WITH ERROR STATUS !!!' ERR | |
DATE=$(date "+%Y-%m-%dT%H:%M:%S") | |
ROOT=/mnt/backup | |
BACKUP_PREFIX="bak-" |
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 bash | |
if ! git rev-parse --git-dir > /dev/null 2>&1; then | |
echo "Not in a git repository." | |
exit 1 | |
fi | |
head_log_line=$(git log --pretty='%d %s' HEAD -1) | |
if current_branch=$(git symbolic-ref -q HEAD); then |
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 company-eshell-history (command &optional arg &rest ignored) | |
(interactive (list 'interactive)) | |
(cl-case command | |
(interactive (company-begin-backend 'company-eshell-history)) | |
(prefix (and (eq major-mode 'eshell-mode) | |
(let ((word (company-grab-word))) | |
(save-excursion | |
(eshell-bol) | |
(and (looking-at-p (s-concat word "$")) word))))) | |
(candidates (remove-duplicates |