Skip to content

Instantly share code, notes, and snippets.

@rlb3
rlb3 / fixopenwith.zsh
Created February 22, 2013 15:23
Remove dups from the 'open with' menu in MacOS X
# Quick way to rebuild the Launch Services database and get rid
# of duplicates in the Open With submenu.
alias fixopenwith='/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user'
(add-to-list 'load-path "/Users/robert/.rvm/gems/ruby-2.0.0-p0/gems/rcodetools-0.8.5.0")
(require 'rcodetools)
git checkout $(git rev-list -n 1 HEAD -- "$file")^ -- "$file"
@rlb3
rlb3 / .zshrc
Created March 6, 2013 15:07
So emacs tramp can login
if [ "$TERM" = "dumb" ]
then
unsetopt zle
unsetopt prompt_cr
unsetopt prompt_subst
# unfunction precmd # these two are not
# unfunction preexec # working for me
PS1='$ '
fi
@rlb3
rlb3 / test.el
Created March 11, 2013 14:13
run a test
(defun rlb3/run-file-run-command (command dir)
(with-temp-buffer
(cd dir)
(compile command)))
(defun rlb3/run-test ()
(interactive)
(let ((file (buffer-file-name)))
(rlb3/run-file-run-command (concat "prove -v --nocolor " file) "/usr/local/cpanel")))
@rlb3
rlb3 / .zshrc.sh
Last active December 14, 2015 21:29
emacs shell aliases
alias estart='/Applications/Emacs.app/Contents/MacOS/Emacs --daemon'
alias e='emacsclient -c -n'
alias t='emacsclient -t'
alias ke='emacsclient -e "(kill-emacs)"'
@rlb3
rlb3 / ctags.sh
Last active December 14, 2015 21:49
ctags command for ruby
ctags -e -a --Ruby-kinds=-fF -o TAGS -R .
@rlb3
rlb3 / magit.el
Created March 13, 2013 18:58
magit-item-highlight
(eval-after-load "magit"
'(set-face-attribute 'magit-item-highlight nil :foreground "#ffffff" :background "#3f4747"))
@rlb3
rlb3 / hunspell.el
Last active December 14, 2015 22:49
Getting hunspell to work...
(if (file-exists-p "/usr/bin/hunspell")
(progn
(setq ispell-program-name "hunspell")
(eval-after-load "ispell"
'(progn
(defun ispell-get-coding-system () 'utf-8)))))