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
set nocompatible | |
let s:dein_root = expand('~/.vim/dein') | |
let s:dein_path = expand(s:dein_root . '/repos/github.com/Shougo/dein.vim') | |
execute 'set runtimepath^=' . s:dein_path | |
call dein#begin(s:dein_root) | |
call dein#add('Shougo/dein.vim') | |
call dein#add('Shougo/vimproc.vim', { | |
\ 'build': 'make' |
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
# specify your favorite filtering tool | |
if [[ -z "$INTERACTIVE_SELECTOR" ]]; then | |
if type fzy >/dev/null 2>&1; then | |
export INTERACTIVE_SELECTOR=fzy | |
elif type peco >/dev/null 2>&1; then | |
export INTERACTIVE_SELECTOR=peco | |
elif type fzf >/dev/null 2>&1; then | |
export INTERACTIVE_SELECTOR=fzf | |
fi | |
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
// Simple HTTP proxy server written in Go. | |
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"net/http/httputil" |
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
// Simple HTTP echo server written in Go. | |
package main | |
import ( | |
"bytes" | |
"context" | |
"flag" | |
"io" | |
"io/ioutil" | |
"log" |
OlderNewer