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
(def directions | |
{:N [-1 0] :NE [-1 1] :E [0 1] :SE [1 1] :S [1 0] :SW [1 -1] :W [0 -1] :NW [-1 -1]}) | |
(defn move-valid? [board piece move] | |
"Returns true if the specified move for the specified piece will cause | |
a piece to be flipped in any direction." | |
(let [r (move 0) c (move 1)] | |
(cond | |
(or (> r 7) (< r 0) (> c 7) (< c 0)) nil | |
(not= nil ((board r) c)) nil |
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 envoy, time, os | |
def main(): | |
old = "" | |
time.sleep(1) | |
while True: | |
new_run = envoy.run("tree -I \"init|*.pyc|*html\" --noreport -L 3 -F") | |
new = new_run.std_out | |
if old != new: | |
envoy.run('clear') |
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
# fix copy-paste in OSX | |
set-option -g default-command "reattach-to-user-namespace -l bash" | |
set -g prefix C-z | |
unbind C-b | |
bind C-z send-prefix | |
set -g status on | |
set -g status-keys emacs | |
set -g status-bg black |
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
export PS1="\w ☞ " | |
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" | |
export EDITOR="emacs" | |
alias l="ls -aG" | |
alias ll="ls -alG" | |
alias ..="cd .." | |
alias k="kill" | |
alias e="emacs" |
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
(add-to-list 'load-path "~/.emacs.d") | |
(require 'better-defaults) | |
(require 'ensure-packages) | |
(require 'bindings) | |
(dolist (x '(scheme emacs-lisp lisp clojure)) | |
(when window-system | |
(font-lock-add-keywords |
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
;; much stolen from github.com/technomancy/better-defaults | |
(load-theme 'tango-dark) | |
(require 'package) | |
(add-to-list 'package-archives | |
'("marmalade" . "http://marmalade-repo.org/packages/") t) | |
(package-initialize) | |
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
(global-set-key (kbd "M-/") 'hippie-expand) | |
(global-set-key (kbd "C-x C-b") 'ibuffer) | |
(global-set-key (kbd "C-s") 'isearch-forward-regexp) | |
(global-set-key (kbd "C-r") 'isearch-backward-regexp) | |
(global-set-key (kbd "C-M-s") 'isearch-forward) | |
(global-set-key (kbd "C-M-r") 'isearch-backward) | |
(global-set-key (kbd "C-c r") 'replace-string) |
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
(defvar packages | |
'(gist clojure-mode coffee-mode auctex | |
haml-mode haskell-mode inf-ruby | |
magit magithub markdown-mode paredit python | |
sass-mode rainbow-mode scss-mode | |
yaml-mode undo-tree) | |
"Packages that should always be installed.") | |
(dolist (p packages) | |
(when (not (package-installed-p p)) |
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
######## TERMINAL TYPE DESCRIPTIONS SOURCE FILE | |
# | |
# Version 11.0.1 | |
# $Date: 2000/03/02 15:51:11 $ | |
# terminfo syntax | |
# | |
# Eric S. Raymond (current maintainer) | |
# John Kunze, Berkeley | |
# Craig Leres, Berkeley | |
# |
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
~ > dig pinboard.in | |
; <<>> DiG 9.8.3-P1 <<>> pinboard.in | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27447 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 | |
;; QUESTION SECTION: | |
;pinboard.in. IN A |