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
# vars | |
project_name=rdev | |
ip=192.168.33.22 # ip address that you want to use | |
user_name=yuki # user name that you want to create | |
# install, settings | |
cd ~/vagrant/vagrant/ | |
vagrant box add $project_name _base/ubuntu-14.04-amd64-vbox.box | |
mkdir $project_name | |
cd $project_name |
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
mkdir -p ~/local/src | |
cd $_ | |
hg clone https://vim.googlecode.com/hg/ vim | |
cd vim/src | |
sudo apt-get install libncurses5-dev lua5.2 luajit liblua5.2-dev nodejs | |
# yum | |
# sudo yum install -y mercurial gcc ncurses-devel lua lua-devel | |
./configure --prefix=$HOME/local --enable-luainterp=yes --enable-pythoninterp=yes --enable-rubyinterp=yes --enable-multibyte --enable-gui=no --with-features=huge --without-x |
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 | |
# check | |
if [ $# -ne 3 ]; then | |
echo "usage : /bin/bash make_db.bash {project} {password} {mysql_root_pass}" | |
echo "e.g. : /bin/bash make_db.bash ProjectA PWhoge MySQLRootPW" | |
exit 1 | |
fi | |
# vars |
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 | |
# usage: sssh [server] | |
# "sssh" dependent on "sshpass" | |
ssh_login(){ | |
if [ $# -ne 1 ]; then | |
echo 'usage: sssh [server]' | |
exit | |
fi |
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
# maintenance文言のHTMLファイル用意しておく | |
ErrorDocument 503 /maintenance.html | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !=/maintenance.html [NC] | |
RewriteCond %{REQUEST_URI} !\.css$ | |
RewriteCond %{REQUEST_URI} !\.js$ | |
RewriteCond %{REQUEST_URI} !\.jpg$ |
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
# ~/.zshrc | |
# ex : php-unserialize PhpSerialized.text | |
function php-unserialize() { | |
php -r "print_r(unserialize(file_get_contents('$*')));" | |
} |
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/perl | |
# Author: Todd Larason <[email protected]> | |
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $ | |
# use the resources for colors 0-15 - usually more-or-less a | |
# reproduction of the standard ANSI colors, but possibly more | |
# pleasing shades | |
# colors 16-231 are a 6x6x6 color cube | |
for ($red = 0; $red < 6; $red++) { |
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
set nocp | |
filetype plugin on | |
set noswapfile | |
set history=10000 | |
set ignorecase | |
set smartcase | |
set noincsearch | |
set nowrapscan | |
set hlsearch | |
nmap <silent> <Esc><Esc> :nohlsearch<CR>:set nopaste<CR><Esc> |
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
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# Aliases | |
alias ls='ls -AFhs --color' |
NewerOlder