This file contains hidden or 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
if has('vim_starting') | |
set rtp+=~/.vim/plugged/vim-plug | |
if !isdirectory(expand('~/.vim/plugged/vim-plug')) | |
echo 'install vim-plug...' | |
call system('mkdir -p ~/.vim/plugged/vim-plug') | |
call system('git clone https://github.com/junegunn/vim-plug.git ~/.vim/plugged/vim-plug/autoload') | |
end | |
endif | |
call plug#begin('~/.vim/plugged') |
This file contains hidden or 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
HISTFILE=$HOME/.history # 履歴をファイルに保存する | |
HISTSIZE=10000000 # メモリ内の履歴の数 | |
SAVEHIST=10000000 # 保存される履歴の数 | |
setopt hist_ignore_dups # 重複を記録しない | |
setopt hist_ignore_all_dups | |
setopt hist_save_no_dups | |
setopt hist_reduce_blanks # スペース排除 | |
setopt extended_history # 履歴ファイルに時刻を記録 | |
setopt share_history # 端末間の履歴を共有 | |
function history-all { history -E 1 } # 全履歴の一覧を出力する |
This file contains hidden or 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
# Pure | |
# by Sindre Sorhus | |
# https://github.com/sindresorhus/pure | |
# MIT License | |
# change this to your own username | |
DEFAULT_USERNAME='sindresorhus' | |
# threshold (sec) for showing cmd exec time |
This file contains hidden or 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
eval "$(rbenv init -)" | |
export PATH=$PATH:$PWD/bin | |
source .zshrc.history | |
source .zshrc.prompt | |
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh |
This file contains hidden or 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-option -g default-terminal screen-256color | |
# set-option -g default-command "reattach-to-user-namespace -l zsh" | |
set -g terminal-overrides 'xterm:colors=256' | |
# Use vim keybindings in copy mode | |
setw -g mode-keys vi | |
# Setup 'v' to begin selection as in Vim | |
bind-key -T copy-mode-vi v send -X begin-selection | |
bind-key -T copy-mode-vi y send -X copy-pipe "reattach-to-user-namespace pbcopy" |
This file contains hidden or 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/sh | |
if [ $# -eq 0 ]; then | |
echo "Usage:" | |
echo "git wip (branch-name) (issue-number)" | |
exit 2 | |
fi | |
issue_number='' | |
branch_name=$1 | |
if [ $# -eq 2 ]; then | |
branch_name="#$2_$1" |
This file contains hidden or 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
# controller名でactiveを判断 | |
# controller_name or [controller_name] or current_page(root_path) | |
def link_to_active(href, condition, wrapper: 'li', **options, &block) | |
active = condition == true || | |
condition == controller.controller_name || | |
(condition.include?(controller.controller_name) if condition.is_a?(Array)) | |
wrapper_tag = wrapper | |
wrapper_class = '' | |
wrapper_tag, wrapper_class = wrapper.first if wrapper.is_a?(Hash) |
This file contains hidden or 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
def flatten_attributes | |
objects = {} | |
stack = [] | |
stack << { name: '', object: html.at('body'), children: html.at('body').children.dup } | |
while stack.present? | |
parent = stack.last | |
obj = parent[:object] | |
name = parent[:name] | |
name += obj.name | |
name = "##{obj.attr(:id)}" if obj.attr(:id) |
This file contains hidden or 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
[core] | |
excludesfile = /Users/aileron/.gitignore_global | |
[user] | |
name = aileron.cc | |
email = [email protected] | |
[push] | |
default = simple | |
[alias] | |
delete-merged-branches = !git branch --merged | grep -v \\* | xargs git branch -d | |
delete-remote-branches = !git fetch --all --prune |
This file contains hidden or 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
title: pokemon-prefix | |
emojis: | |
- name: pokemon-fushigidane | |
src: http://i.imgur.com/J9ynKU9.png | |
- name: pokemon-fushigiso | |
src: http://i.imgur.com/2BmEJY1.png | |
- name: pokemon-fushigibana | |
src: http://i.imgur.com/HyvH3iG.png | |
- name: pokemon-hitokage | |
src: http://i.imgur.com/je6nD3.png |