Skip to content

Instantly share code, notes, and snippets.

"" CtrlP with current filename
command! -nargs=0 CtrlPSwitcher call s:ctrlp_switcher()
function! s:ctrlp_switcher()
try
let default_input_save = get(g:, 'ctrlp_default_input', '')
let g:ctrlp_default_input = expand('%:t:r')
call ctrlp#init(g:ctrlp_builtins)
finally
if exists('default_input_save')
[user]
name = Koichi TANAKA
email = tanaka51.jp@gmail.com
[core]
excludesfile = ~/.gitignore
[init]
templatedir = /Users/tanaka51/.git_templates
[ghq]
root = /Users/tanaka51/src
[alias]
@tanaka51
tanaka51 / .vimrc
Last active August 29, 2015 14:22
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'altercation/vim-colors-solarized'
Plugin 'bronson/vim-trailing-whitespace'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'glidenote/memolist.vim'
# mode
set -g mode-keys vi
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
# default shell
set -g default-shell /usr/local/bin/zsh
# prefix
set -g prefix C-z
export LANG=ja_JP.UTF-8
export EDITOR=vim
export TERM='screen-256color'
HISTFILE=$HOME/.zsh-history
HISTSIZE=100000
SAVEHIST=100000
bindkey -e
gulp = require 'gulp'
util = require 'gulp-util'
source = require 'vinyl-source-stream'
browserify = require 'browserify'
watchify = require 'watchify'
gulp.task 'watch', ->
bundler = watchify browserify
entries: ['./src/index.coffee']
extensions: ['coffee']
$ g diff Gemfile.lock
diff --git a/Gemfile.lock b/Gemfile.lock
index f0ba45c..dfe4057 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -133,6 +133,35 @@ GEM
jbuilder (2.2.5)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
+ jpmobile (4.1.4)
@tanaka51
tanaka51 / application_helper.rb
Last active August 29, 2015 14:10
i wanna do json_for
module ApplicationHelper
# http://railscasts.com/episodes/409-active-model-serializers?view=asciicast
# `json_for` method described at above page doesnt work for AMS 9.0...
def json_for(target)
serializer = ActiveModel::Serializer.serializer_for(target)
if serializer.class == ActiveModel::ArraySerializer
serializer.new(
target,
each_serializer: ActiveModel::Serializer.serializer_for(target.first)
@tanaka51
tanaka51 / .zshrc
Created September 23, 2014 02:17
zshrc
export LANG=ja_JP.UTF-8
export EDITOR=vim
export TERM='screen-256color'
HISTFILE=$HOME/.zsh-history
HISTSIZE=100000
SAVEHIST=100000
bindkey -e
@tanaka51
tanaka51 / .tmux.conf
Created September 23, 2014 02:16
tmux.conf
# mode
set -g mode-keys vi
bind -t vi-copy 'v' begin-selection
bind -t vi-copy 'y' copy-selection
# default shell
set -g default-shell /usr/local/bin/zsh
# prefix
set -g prefix C-z