Skip to content

Instantly share code, notes, and snippets.

(defun mine-set-sbt-keys-if-possible ()
(if (sbt:find-root)
(progn
(local-set-key (kbd "C-c s s") 'mine-sbt-switch)
(local-set-key (kbd "C-c s c") 'mine-sbt-compile)
(local-set-key (kbd "C-c s k") 'mine-sbt-console)
(local-set-key (kbd "C-c s l") 'mine-sbt-last)
(local-set-key (kbd "C-c s r") 'mine-sbt-run)
(local-set-key (kbd "C-c s t") 'mine-sbt-test)
(local-set-key (kbd "C-c s o") 'mine-sbt-test-only-current-test)
#!/bin/bash
EMACSCLIENT=/usr/local/bin/emacsclient
ALT=$HOME/bin/start-emacs
if [ "$1" = "-e" ]; then
$EMACSCLIENT "$@"
else
$EMACSCLIENT -c -a $ALT "$@"
fi
#!/bin/sh
open -a /Applications/Emacs.app "$@" --args --debug-init
Host *.vagrant 192.168.99.* 192.168.33.* 192.168.56.*
User vagrant
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
IdentityFile /Users/luke/.vagrant.d/insecure_private_key
IdentitiesOnly yes
#!/bin/sh
git sweep cleanup
git remote prune origin
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
#!/bin/sh
for dir in `find . -maxdepth 2 -name '.git' -type d`; do
echo $dir
git --git-dir=$dir fetch
done
(defun browse-url-chrome-new-window (url &optional new-window)
(interactive (browse-url-interactive-arg "URL: "))
(do-applescript (format "
tell application \"Google Chrome\"
make new window
activate
set URL of active tab of first window to \"%s\"
end tell
" url)))
#!/bin/sh
git sweep cleanup
git remote prune origin
git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
@lamdor
lamdor / gtd.el
Created November 13, 2013 16:51
(global-set-key (kbd "C-c g j") 'mine-org-clock-goto)
(global-set-key (kbd "C-c g o") 'mine-open-clocked-in-task-link)
(defun mine-org-clock-goto ()
(interactive)
(org-clock-goto (not (org-clocking-p))))
(defun mine-get-clocked-in-task-link (&optional recent)
(if (or recent (org-clocking-p))
(save-excursion
;; expand-region, mark-multiple, enclose, wrap-region, scala-mode2
(defun load-init (name)
(load-file (concat user-emacs-directory "/init/init-" name ".el")))
(defun package-install-with-init (name)
(when (not (package-installed-p name))
(package-install name))
(require name)
(load-init (symbol-name name)))