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
$ bundle exec rake -T | |
/usr/local/bin/rake:23:in `load': cannot load such file -- /usr/local/lib/ruby/gems/1.9.1/specifications/bin/rake (LoadError) | |
from /usr/local/bin/rake:23:in `<main>' | |
$ bundle exec ruby -e 'p Gem.bin_path("rake", "rake")' | |
"/usr/local/lib/ruby/gems/1.9.1/specifications/bin/rake" | |
$ ruby -e 'p Gem.bin_path("rake", "rake")' | |
"/usr/local/lib/ruby/gems/1.9.1/gems/rake-10.0.4/bin/rake" |
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
module Enumerable | |
def each_with_peek_ahead | |
@_start = false | |
self.each_with_index do |current, idx| | |
if idx == 0 | |
@_last = current | |
@_start = true | |
else | |
yield @_last, current | |
@_last = current |
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/bash | |
function cmd() { | |
target=$1; shift | |
pane=$1; shift | |
tmux send-keys -t:$target.$pane "$*" C-m | |
} | |
function window() { | |
tmux new-window -a -n "$1" |
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
(add-hook 'view-mode-hook | |
(lambda () | |
(define-key view-mode-map "b" 'View-scroll-page-backward) | |
(define-key view-mode-map "j" 'View-scroll-line-forward) | |
(define-key view-mode-map "k" 'View-scroll-line-backward))) |
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
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
set autoindent | |
set nowrap | |
set nocompatible | |
set smartcase | |
set smartindent | |
set smarttab |
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
function map(arr, fn) { | |
var result = []; | |
for (var i = 0; i < arr.length; i++) { | |
result[i] = fn(arr[i]); | |
} | |
return result; | |
} |
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
;;;; -*- mode: emacs-lisp; coding: iso-2022-7bit -*- | |
;;; key-bind for cake | |
;; C-h をバックスペースに変更。 | |
(define-key global-map [8] 'delete-backward-char) | |
(define-key global-map "\M-?" 'help-command) | |
(define-key global-map "\M-g" 'goto-line) | |
;; buffer list表示後カーソルをそこに移動する。 | |
(define-key ctl-x-map "\C-b" 'buffer-menu) |
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
;; This buffer is for notes you don't want to save, and for Lisp evaluation. | |
;; If you want to create a file, visit that file with C-x C-f, | |
;; then enter the text in that file's own buffer. | |
;;;; -*- mode: emacs-lisp; coding: iso-2022-7bit -*- | |
(define-key global-map [8] 'delete-backward-char) | |
(define-key global-map "\M-?" 'help-command) | |
(define-key global-map "\M-g" 'goto-line) | |
NewerOlder