Skip to content

Instantly share code, notes, and snippets.

View user_add
#!/bin/sh
# sudo ./user_add dlab-inc.jp
# 1. ユーザーdlab-inc.jpを追加
# 2. dotfilesを設置
# 3. /etc/httpd/conf.d/以下に、${name}.confの名前でapache用設定を追加
# 4. gitを$HOMEに作成。pushすればhookによりwwwディレクトリを更新する
# define name and password
name=$1
View http_skel.conf
<VirtualHost *:80>
ServerAdmin webmaster@domain
DocumentRoot /home/domain/www
ServerName domain
ErrorLog logs/domain.com-error_log
CustomLog logs/domain.com-access_log common
<Directory /home/domain/www>
Options FollowSymLinks
Options -Indexes
View user_del
#!/bin/sh
name=$1
if [ ! -d ${user_dir} ]
then
echo "${name}というユーザーは存在しません。"
sleep 2
exit
fi
View post-receive
(cd git_directory;git --git-dir=.git pull;)
View colorcode
#!/bin/sh
#
# 256色のカラーパレットを表示する
# bash と zsh にて実行可能
#
target_shell=$1
if [ -z "$1" ]; then
target_shell=$(basename "$SHELL")
View .vimrc
NeoBundle 'taichouchou2/alpaca_english', {
\ 'rev' : 'development',
\ }
let g:alpaca_english_enable = 1
View .vimrc
NeoBundle 'taichouchou2/alpaca_english', {
\ 'rev' : 'development',
\ }
let g:alpaca_english_enable = 1
" 下記コマンドで補完が有効化
" :AlpacaEnglishEnable
View initialize.vim
" autload/test.vim
function! test#initialize()
ruby << EOF
EOF
endfunction
" autoload/test/initialize.vim
function! test#initialize#expect_error()
call test#initialize()
View gist:5488019
https://github.com/mmoya/thc-ipv6
gcc -O2 -D_HAVE_SSL -I/usr/local/Cellar/readline/6.2.4/include -c -o thc-ipv6-lib.o thc-ipv6-lib.c
thc-ipv6-lib.c: In function ‘thc_look_neighborcache’:
thc-ipv6-lib.c:692: error: storage size of ‘nladdr’ isn’t known
thc-ipv6-lib.c:699: error: ‘AF_NETLINK’ undeclared (first use in this function)
thc-ipv6-lib.c:699: error: (Each undeclared identifier is reported only once
thc-ipv6-lib.c:699: error: for each function it appears in.)
thc-ipv6-lib.c:699: error: ‘NETLINK_ROUTE’ undeclared (first use in this function)
thc-ipv6-lib.c:700: error: invalid application of ‘sizeof’ to incomplete type ‘struct sockaddr_nl’
View gist:5521839
let s:bundle_dir = expand("~/.bundle")
if !isdirectory(s:bundle_dir)
call mkdir(s:bundle_dir)
call system( 'git clone https://github.com/Shougo/neobundle.vim.git ' . s:bundle_dir )
endif
execute 'set runtimepath+='.s:bundle_dir.'/neobundle.vim'
call neobundle#rc(s:bundle_dir)