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
" Vim Color File | |
" | |
" pencil256.vim is a derived version of pencil.vim. pencil256 supports | |
" terminal-based Vim without pencil color scheme for the terminal. | |
" (Original pencil.vim requires it such as iterm-colors-pencil) | |
" | |
" In terminal-based Vim, pencil256 has a little difference of colors, because | |
" pencil256 uses the default palette of the terminal (such as xterm 256 color). | |
" | |
" Name: pencil256.vim |
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
# encoding: utf-8 | |
require "optparse" | |
require "redcarpet" | |
class HTMLWithSyntaxHighlighter < Redcarpet::Render::HTML | |
ESCAPE_HTML_TABLE = { | |
"'" => ''', | |
'&' => '&', | |
'"' => '"', |
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
import ( | |
"os/user" | |
"strings" | |
) | |
func ExpandTilde(path string) (string, error) { | |
if path[0] != '~' { | |
return path, nil | |
} |
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
# encoding: utf-8 | |
# 論理値に変換する | |
# | |
# falseとなる値 | |
# nil, false, 0 | |
# falseとなる文字列(大文字小文字区別なし) | |
# 0, 0.0, f, false, n, no, off, 空文字, 空白文字のみ | |
# trueとなるもの | |
# 上記以外 |
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
" unicodeescape.vim - Escape/Unescape unicode string. | |
function! UnicodeEscapeString(str) | |
let oldenc = &encoding | |
set encoding=utf-8 | |
let escaped = substitute(a:str, '[^[:alnum:][:blank:][:cntrl:][:graph:]]', '\=printf("\\u%04x", char2nr(submatch(0)))', 'g') | |
let &encoding = oldenc | |
return escaped | |
endfunction |
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
#!/bin/sh | |
# | |
# git-export - Create an unversioned copy of a tree. | |
# | |
# USAGE | |
# git export [<tree-ish>] <path> | |
# | |
# Author: Yuki <paselan@gmail.com> | |
# License: MIT License | |
# |
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
wget http://pear.php.net/go-pear.phar | |
php go-pear.phar | |
pear update-channels | |
pear clear-cache | |
pear upgrade | |
pear config-set auto_discover 1 | |
pear install pear.pdepend.org/PHP_Depend | |
pear install pear.phpmd.org/PHP_PMD | |
pear install pear.phpunit.de/PHPUnit | |
pear install pear.phpunit.de/phpcpd |
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
#!/bin/bash | |
# | |
# List tags with commit date. | |
# | |
for tag in $(git tag) | |
do | |
ldate=$(git log -1 --pretty=format:%cd --date=local $tag) | |
date=$(date +"%F %T" -d "$ldate") | |
echo -e "$tag\t$date" |
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 disablesites=mail.google.com,reader.livedoor.com,github.com,bitbucket.org,trello.com,www.blogger.com/blogger.g,stackedit.io | |
set enable_vrome_key=<C-z> | |
" set autocomplete_prev=<C-n> | |
" set autocomplete_next=<C-p> | |
set hintkeys=jlkhfsdagwerui | |
set useletters=1 | |
unmap <M-d> | |
unmap <M-f> | |
unmap do |
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
# | |
# nginx configuration example for Symfony2 | |
# | |
server { | |
listen 80; | |
server_name symfony2-example; | |
root /var/www/sf2/web; | |
access_log /var/log/nginx/sf2.access.log; | |
error_log /var/log/nginx/sf2.error.log; |
OlderNewer