Skip to content

Instantly share code, notes, and snippets.

View violetyk's full-sized avatar

kagaya violetyk

View GitHub Profile
@violetyk
violetyk / test
Last active December 22, 2015 20:08
let cmd = 'vmstat 1 5 &'
let sub = vimproc#popen2(cmd)
" echo sub.pid
echo keys(sub)
echo keys(sub.stdout)
while !sub.stdout.eof
let res = sub.stdout.read()
call append(line('$'), split(res, '\r\n\|\r\|\n'))
endwhile
<?php
/*
* vi php.ini
* detect_unicode = Off
*
* vi composer.json
* {
* "require" :{
* "aws/aws-sdk-php": "2.4.3"

CakeDC Migration

設置

https://github.com/CakeDC/migrations

  • vendorなどにMigrationsとして配置
  • bootstrap.phpにプラグインをロードする記述 CakePlugin::load(array('Migrations'));
# node.jsとternのインストール
```sh
yum install gcc gcc-c++ kernel-devel libssl-devel
cd /usr/local/src
wget http://nodejs.org/dist/v0.10.15/node-v0.10.15.tar.gz
cd /usr/local/src/node-v0.10.15
# 要python2.6 or 2.7
" neocomplcache.vim {{{
" パラメータ設定 {{{
" Disable AutoComplPop.
let g:acp_enableAtStartup = 0
" Use neocomplcache.
let g:neocomplcache_enable_at_startup = 1
" 入力に大文字が入力されていたら、大文字小文字の区別をする
let g:neocomplcache_enable_smart_case = 0
" 大文字小文字区切りの曖昧検索をするかどうか。DT = D*T* -> DateTime

まずはxcodeをインストール

xcodebuild -licence
agree

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew doctor

brew install libevent
@violetyk
violetyk / redis.md
Last active December 20, 2015 02:59

RedisをCentOSにインストール

cd /usr/local/src
wget http://redis.googlecode.com/files/redis-2.6.14.tar.gz
tar xf redis-2.6.14.tar.gz
cd redis-2.6.14
make MALLOC=jemalloc
strings src/redis-server | grep jemalloc
paco -D make install PREFIX=/usr/local/redis-2.6.14

python2と3

cd ~/src
wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2
tar xf Python-2.7.5.tar.bz2
cd Python-2.7.5
./configure --prefix=/usr/local/python-2.7 --enable-shared
make -j
sudo paco -D make install
" precious " {{{
let g:precious_enable_switchers = {
\ "*" : {
\ "setfiletype" : 0
\ },
\ "markdown" : {
\ "setfiletype" : 1
\ },
\}
" }}}
function! s:search_line(path, term)
let line = match(readfile(a:path), '\%(const\|static\|function\)!\?\s*' . a:term)
if line >= 0
return line+1
endif
return 0
endfunction