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
| object TicTacToe { | |
| sealed trait Player | |
| case object X extends Player | |
| case object O extends Player | |
| sealed trait Fin3 | |
| case object I1 extends Fin3 | |
| case object I2 extends Fin3 | |
| case object I3 extends Fin3 |
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
| require 'time' | |
| def dropbox(dir) | |
| File.join("~/Dropbox", dir) | |
| end | |
| DOWNLOADS_DIR = "~/Downloads" | |
| PENDING_DIR = dropbox("Desktop/Pending") |
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
| ;; 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))) |
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
| (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 |
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
| #!/bin/sh | |
| git sweep cleanup | |
| git remote prune origin | |
| git branch --merged | grep -v "\*" | xargs -n 1 git branch -d |
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
| (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))) |
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
| #!/bin/sh | |
| for dir in `find . -maxdepth 2 -name '.git' -type d`; do | |
| echo $dir | |
| git --git-dir=$dir fetch | |
| done |
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
| #!/bin/sh | |
| git sweep cleanup | |
| git remote prune origin | |
| git branch --merged | grep -v "\*" | xargs -n 1 git branch -d |
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
| 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 |
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
| #!/bin/sh | |
| open -a /Applications/Emacs.app "$@" --args --debug-init |