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
| ;;; anything | |
| (setq anything-command-map-prefix-key "C-x C-a") | |
| (require 'anything) | |
| ;; C-z は C-; で実行できるようにする | |
| (define-key anything-map (kbd "C-;") 'anything-execute-persistent-action) | |
| (define-key anything-map (kbd "M-;") 'anything-execute-persistent-action) | |
| (require 'anything-startup) | |
| (dolist (map (list | |
| anything-map | |
| anything-c-buffer-map |
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
| % make test-all | |
| ./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems "./test/runner.rb" --ruby="./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems" | |
| Run options: "--ruby=./miniruby -I./lib -I. -I.ext/common ./tool/runruby.rb --extout=.ext -- --disable-gems" | |
| # Running tests: | |
| ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... |
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
| --- session.el.orig 2012-02-18 12:58:20.000000000 +0900 | |
| +++ session.el 2012-02-18 13:07:47.000000000 +0900 | |
| @@ -409,6 +409,11 @@ | |
| :group 'session-globals | |
| :type 'regexp) | |
| +(defcustom session-globals-exclude-regexp "\\`anything-" | |
| + "Regexp matching global variables NOT to be saved between sessions." | |
| + :group 'session-globals | |
| + :type 'regexp) |
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
| if type growlnotify > /dev/null 2>&1 | |
| then | |
| GROWL_REPORTTIME=5 | |
| COMMAND= | |
| COMMAND_START_TIME=0 | |
| function reset_command_start_time { | |
| COMMAND="${1}" | |
| COMMAND_START_TIME=`date +%s` | |
| echo $COMMAND | |
| } |
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 shogun { | |
| : | |
| } | |
| function _shogun { | |
| local -a _names | |
| _names=( | |
| Ieyasu | |
| Hidetada |
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
| (setcdr (assoc 'action anything-c-source-minibuffer-history) | |
| (lambda (candidate) | |
| (delete-minibuffer-contents) | |
| (insert candidate))) |
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 bundle-cd { | |
| local output exit_status | |
| output=`bundle show $1` | |
| exit_status=$? | |
| if [ $exit_status -eq 0 ]; then | |
| cd "$output" | |
| else | |
| echo $output 1>&2 | |
| return $exit_status | |
| fi |
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 kill-buffer-file-name (nondirectory-p) | |
| (interactive "P") | |
| (let ((file-name (buffer-file-name))) | |
| (if (stringp file-name) | |
| (progn | |
| (when nondirectory-p | |
| (setq file-name (file-name-nondirectory file-name))) | |
| (message "%s" file-name) | |
| (kill-new file-name)) | |
| (error "This buffer does not visit a file")))) |
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 'active_record' | |
| class Foo < ActiveRecord::Base; end | |
| module Bar | |
| refine Integer do | |
| define_method(:+) { } | |
| end | |
| end |
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
| def run | |
| results = [] | |
| 1.upto(100000) do |i| | |
| results.push(rand(2)) | |
| results.shift if results.size == 4 | |
| if results.size == 3 && results.uniq.size == 1 | |
| return i | |
| end | |
| end |