Skip to content

Instantly share code, notes, and snippets.

View aileron's full-sized avatar

AILERON aileron

View GitHub Profile
@aileron
aileron / .vimrc
Created July 27, 2018 07:44
minimum vimrc
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')
@aileron
aileron / .zshrc.history
Created July 16, 2018 15:43
history file
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 } # 全履歴の一覧を出力する
@aileron
aileron / .zshrc.prompt
Last active July 16, 2018 15:43
cool prompt
# 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
@aileron
aileron / .zshrc
Last active July 16, 2018 15:43
.zshrc 2018
eval "$(rbenv init -)"
export PATH=$PATH:$PWD/bin
source .zshrc.history
source .zshrc.prompt
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
@aileron
aileron / .tmux.conf
Created January 17, 2018 01:12
.tmux.conf vi mode
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"
@aileron
aileron / git-wip.sh
Last active October 6, 2017 08:06
github wip flow
#!/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"
@aileron
aileron / link_to_active.rb
Created May 22, 2017 23:58
link_to_active
@aileron
aileron / flatten_attributes.rb
Last active March 21, 2017 12:55
Nokogiri でパースしたオブジェクトの xpath 列挙
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)
[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
@aileron
aileron / pokemoji.yml
Created September 2, 2016 08:47
pokemon-go-jpn
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