Skip to content

Instantly share code, notes, and snippets.

@akishin
akishin / rbenv_setup.sh
Created November 4, 2012 11:31
rbenv_setup.sh
#!/bin/sh
if [ -d $HOME/.rbenv ]
then
echo "$HOME/.rbenv already exists."
exit 1
fi
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
mkdir -p ~/.rbenv/plugins
@akishin
akishin / .vimrc.neobundle
Created November 4, 2012 07:56
.vimrc.neobundle
" neobundle required.
set nocompatible
filetype off
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
call neobundle#rc(expand('~/.vim/bundle/'))
@akishin
akishin / gitsync.sh
Created June 29, 2012 03:35
gitsync.sh
#!/bin/sh
ORIGIN="serverA"
MIRROR="serverB"
SYNC_USER="git"
ORIGIN_REPO_ROOT="/home/$SYNC_USER/repositories"
MIRROR_REPO_ROOT="/home/$SYNC_USER/repositories"
LOGFILE=$ORIGIN_REPO_ROOT/gitsync.log
reponame=$(basename $(pwd))
@akishin
akishin / .vimrc.plugins
Created May 27, 2012 10:37
.vimrc.plugins
" for Plugin settings
" for Wombat
if isdirectory($HOME . '/.vim/bundle/Wombat')
colorscheme wombat
endif
" for NERDTree
if isdirectory($HOME . '/.vim/bundle/The-NERD-tree')
" autocmd VimEnter * NERDTree
@akishin
akishin / .vimrc.vundle
Created May 27, 2012 04:20
.vimrc.vundle
" vundle required.
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
" vim-scripts で提供されている vim プラグイン
Bundle 'Wombat'
Bundle 'pyte'
@akishin
akishin / .gvimrc
Created May 27, 2012 04:17
.gvimrc
" 縦幅
set lines=60
" 横幅
set columns=160
" クリップボード共有
set clipboard=unnamed
" ツールバーを削除
@akishin
akishin / tmail_19_patch.rb
Created February 8, 2012 04:18
Ruby 1.9 + tmail-1.2.7 環境での Encoding::CompatibilityError 対策用。
# encoding: utf-8
# Ruby 1.9 + tmail-1.2.7 環境での
#「Encoding::CompatibilityError (incompatible encoding regexp match (ASCII-8BIT regexp with ISO-2022-JP string))」
# エラー対策。
# Rails の場合 config/initializers 以下に配置する。
#
module TMail
class Encoder
def phrase( str )
str = normalize_encoding(str)
@akishin
akishin / .vimrc
Created December 16, 2011 08:14
.vimrc
" for vundle
if filereadable(expand("~/.vimrc.vundle"))
source ~/.vimrc.vundle
endif
" for neobundle
if filereadable(expand("~/.vimrc.neobundle"))
source ~/.vimrc.neobundle
endif
@akishin
akishin / setupvimplugin.sh
Created December 10, 2011 07:30
setupvimplugin.sh
#!/bin/sh
# backup file directory
if [ ! -d $HOME/tmp ]
then
echo "create directory $HOME/tmp"
mkdir $HOME/tmp
fi
# plugin directory
@akishin
akishin / .irbrc
Created December 10, 2011 07:18
Windows用irbrc
require 'rubygems' rescue nil
require 'win32console'
require 'wirble'
require 'hirb'
# require 'hirb-unicode'
require 'pp'
require 'awesome_print'
# irb の設定
IRB.conf[:SAVE_HISTORY] = 100000