Skip to content

Instantly share code, notes, and snippets.

@rohinomiya
rohinomiya / run_GoogleIME_word_register_dialog.ahk
Created August 27, 2011 08:28
AutoHotKey script / run GoogleIME word register dialog when press [ctrl]+[f10] key
; run GoogleIME word register dialog when press [ctrl]+[f10] key.
#NoEnv
#NoTrayIcon
#Persistent
run_googleime_word_register_dialog()
{
GoogleIMEToolPath = C:\Program Files\Google\Google Japanese Input\GoogleIMEJaTool.exe
Option = "--mode=word_register_dialog"
@rohinomiya
rohinomiya / _vimrc_quickrun
Created September 1, 2011 22:18
.vimrc quickrun.vim setting
""" quickrun.vim
" RSpec 対応
let g:quickrun_config = {}
let g:quickrun_config['ruby.rspec'] = {'command': 'rspec'}
augroup RSpec
autocmd!
autocmd BufWinEnter,BufNewFile *_spec.rb set filetype=ruby.rspec
@rohinomiya
rohinomiya / rspec_orig.bat
Created September 1, 2011 22:33
rspec.bat before edit
@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"ruby.exe" "C:/ruby/bin/rspec" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@rohinomiya
rohinomiya / rspec.bat
Created September 1, 2011 22:34
rspec.bat after edit
@ECHO OFF
IF NOT "%~f0" == "~f0" GOTO :WinNT
@"ruby.exe" "C:/ruby/bin/rspec" %1 %2 %3 %4 %5 %6 %7 %8 %9
GOTO :EOF
:WinNT
@"ruby.exe" "%~$PATH:0" %*
@rohinomiya
rohinomiya / .autotest
Created September 3, 2011 20:40
sample of AuutoTest configuration file
# -*- ruby -*-
require 'autotest/growl'
Autotest.add_discovery { "rspec" }
# ./foo.rb が更新されると ./spec/foo_spec.rb が走る。
Autotest.add_hook :initialize do |at|
at.add_mapping(/([\w\d_]+)\.rb$/) {|f, matched|
"spec/#{matched[1]}_spec.rb"
}
@rohinomiya
rohinomiya / .vimrc
Created September 10, 2011 14:15
_vimrc / load another file
if filereadable('~/_vimrc.github')
source ~/_vimrc.github
endif
@rohinomiya
rohinomiya / gist:1208397
Created September 10, 2011 14:58
_vimrc / not case-sensitive at completion
" 検索時に大文字小文字を無視
set ignorecase
" 検索文字列に大文字が含まれている場合は区別して検索する、を無効に(nosmartcase)
set nosmartcase
@rohinomiya
rohinomiya / run_rdoc.bat
Created September 11, 2011 08:15
rdoc my usually setting
@echo off
rem rdoc -S -N -c <文字コード> -t <タイトル> -m <デフォルトページ> <対象ファイル>
rdoc -S -N -c UTF-8 -t "Process files properly." -m fileprocess.rb *.rb
@rohinomiya
rohinomiya / test.watchr
Created September 11, 2011 09:40
watchr setting sample
require 'watchr'
def run(cmd)
cmd = "phpunit #{cmd}"
puts "$ #{cmd}"
system cmd
end
watch("^src/(.*).php") { |m| run "tests/#{m[1]}Test" }
watch("^tests/(.*)Test.php") { |m| run "tests/#{m[1]}Test" }
CHARACTER_SET:utf-8