This file contains 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
" First, install thinca/vim-quickrun | |
" | |
" https://github.com/thinca/vim-quickrun | |
" | |
" Then write some vimrc: | |
" |
This file contains 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
rtouch() { | |
emulate -L zsh | |
if [[ -d tmp ]]; then | |
if which passenger 2>&1 >/dev/null; then | |
touch tmp/restart.txt && echo 'file touched.' | |
elif which unicorn_rails 2>&1 >/dev/null; then | |
if [[ -r tmp/pids/unicorn.pid && -n $(ps h -p `cat tmp/pids/unicorn.pid` | tr -d ' ') ]]; then | |
kill -USR2 $(cat tmp/pids/unicorn.pid) && echo "process killed." | |
elif [[ -f config/unicorn.rb ]] && [[ -n $RAILS_ENV ]]; then | |
bundle exec unicorn_rails -D -E $RAILS_ENV -c config/unicorn.rb && echo "process started." |
This file contains 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
module ActionController | |
class Metal | |
attr_internal :cached_content_for | |
end | |
module Caching | |
module Actions | |
def _save_fragment(name, options) | |
return unless caching_allowed? |
This file contains 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
[user] | |
name = bootleq | |
email = bootleq@gmail.com | |
[color] | |
ui = auto | |
; [help] | |
; format = web |
This file contains 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
# References: | |
# GRML - https://github.com/grml/grml-etc-core | |
# zsh-users - https://github.com/zsh-users | |
[[ $ZDOTDIR == '' ]] && export ZDOTDIR=$HOME | |
if [[ $ZDOTDIR == '/etc/users/bootleq' && -f $ZDOTDIR/.vimrc ]]; then | |
alias vim="vim -u $ZDOTDIR/.vimrc" | |
fi |
This file contains 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 all& | |
set nocompatible | |
set runtimepath= | |
set rtp+=~/repository/delimitMate/ | |
set backspace=indent,eol,start | |
let delimitMate_expand_cr = 1 |
This file contains 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
let SessionLoad = 1 | |
if &cp | set nocp | endif | |
let s:so_save = &so | let s:siso_save = &siso | set so=0 siso=0 | |
let v:this_session=expand("<sfile>:p") | |
silent only | |
cd ~/repository/dotfiles/vim-test | |
if expand('%') == '' && !&modified && line('$') <= 1 && getline(1) == '' | |
let s:wipebuf = bufnr('%') | |
endif | |
set shortmess=aoO |
This file contains 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
() { | |
# TODO --hidden | |
local common='noglob ag --nobreak --nogroup --noheading --smart-case --depth=27' | |
local colors='--color-path 35 --color-line-number 32 --color-match "1;31"' | |
alias ag=$common' '$colors | |
alias agjs=$common' '$colors' -G public/javascripts/.*-(debug|src).js' | |
} |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" | |
xmlns:moz="http://www.mozilla.org/2006/browser/search/"> | |
<ShortName>萌典</ShortName> | |
<Description>教育部國語詞典(民間線上版)</Description> | |
<InputEncoding>UTF-8</InputEncoding> | |
<Image width="16" height="16" type="image/x-icon">https://www.moedict.tw/favicon.ico</Image> | |
<Url type="text/html" method="GET" template="https://www.moedict.tw/#{searchTerms}"></Url> | |
</OpenSearchDescription> |
This file contains 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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'redis' | |
require 'active_support/core_ext/hash' | |
require 'optparse' | |
require 'yaml' | |
require 'pp' | |
options = {}.with_indifferent_access |