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
#!/usr/bin/env python | |
# -*- coding: utf8 -*- | |
############################################ | |
## Setup | |
############################################ | |
# function which return newley created function | |
def gen_seq_transformer(f): | |
""" | |
Take trans function as argment |
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
echo "-----------------------------------------------" | |
echo "Self training for 'vim_vridge' example" | |
echo " http://github.com/nvie/vim_bridge/tree/master/examples/" | |
echo "-----------------------------------------------" | |
echo "Example 1" | |
echo "-----------------------------------------------" | |
python << ENDPYTHON | |
from vim_bridge import bridged | |
@bridged |
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
ruby << ENDRUBY | |
require 'rubygems' | |
require 'appscript' | |
include Appscript | |
class ITerm | |
class << self | |
def activate; | |
@iterm ||= app('iTerm') |
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
ruby << ENDRUBY | |
require 'rubygems' | |
require 'appscript' | |
ENDRUBY | |
fun! ITermWrite(cmd) | |
ruby Appscript.app('iTerm').current_terminal.sessions.write(:text => VIM::evaluate('a:cmd')) | |
endfun | |
command! -nargs=? RakeOnIterm :call ITermWrite("rake " .<q-args>) |
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
window :name => "win1 tab1", :win_bounds => {:side => 0, :top => 0, :width => 500, :height => 500 } do | |
run "echo 'win1 tab1'" | |
tab :name => "tab2", :session => "Default Session" do | |
# run_file でファイルからコマンドリストを読み込む事も可能。 | |
run_file "~/.iterminitor/run_file_example" | |
run 'echo tab2' | |
end | |
# You can specify bookmarked session name for ':session' option |
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
#!/bin/bash | |
export LANG=C | |
for service in $(/sbin/chkconfig --list | grep 3:on | awk '{ print $1 }') | |
do | |
while : | |
do | |
echo -n "disable $service ?: " | |
read answer | |
case $answer in | |
Y|y) |
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
#!/bin/bash | |
VPSID=$1IPADDR=$2 | |
HOSTNAME=$3help(){ | |
echo "$(basename $0) 'VPSID' 'IPADDR' 'HOSTNAME'" echo "ex) $(basename $0) 1001 192.168.3.1 vps01"} | |
if [ $# -ne 3 ];then | |
help | |
exit 1 | |
fi | |
vzlist ${VPSID} >/dev/null 2>&1 |
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
echo -e "let g:vimrc_local_finish = 1\nset langmenu=ja_ja.utf-8.macvim" > /Applications/MacVim.app/Contents/Resources/vim/vimrc_local.vim | |
echo "let g:gvimrc_local_finish = 1" > /Applications/MacVim.app/Contents/Resources/vim/gvimrc_local.vim |
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
#!/usr/bin/env ruby | |
# DIRECTION=ARGV[0] | |
# A move and resize argument has the format 'g,x,y,w,h'. All five | |
# components are integers. The first value, g, is the gravity of | |
# the window, with 0 being the most common value (the default | |
# value for the window). Please see the EWMH specification for | |
# other values. | |
# The four remaining values are a standard geometry specification: |
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
" Utility function"{{{ | |
fun! Echo(e) | |
echo a:e | |
endfun | |
fun! Header(num) | |
echo "\n" . a:num . "\n" | |
endfun | |
command! -nargs=* H :call Header(<f-args>)"}}} | |
function! Curry(...)"{{{ |