Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home, except for the weekend.

WADA Takashi watagashi

🏠
Working from home, except for the weekend.
View GitHub Profile
View plug.vim.diff
diff --git a/plug.vim b/plug.vim
index 9ebcf53..883187b 100644
--- a/plug.vim
+++ b/plug.vim
@@ -799,7 +799,7 @@ function! s:bang(cmd, ...)
let cmd = a:0 ? s:with_cd(a:cmd, a:1) : a:cmd
if s:is_win
let batchfile = tempname().'.bat'
- call writefile(['@echo off', cmd], batchfile)
+ call writefile(['@echo off', cmd], s:shellesc(batchfile))
View customCode.js
var originalTitle = document.title;
function updateTitle() {
document.title = document.querySelectorAll('#reply.new, #direct.new').length > 0 ? '(\u2022) ' + originalTitle : originalTitle;
}
registerPlugin({
newMessageElement: updateTitle,
newDM: updateTitle,
switchTo: updateTitle
});
View file0.txt
% git clone http://repo.or.cz/guilt.git
Cloning into 'guilt'...
remote: Counting objects: 3844, done.
remote: Total 3844 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3844/3844), 624.05 KiB | 152.00 KiB/s, done.
Resolving deltas: 100% (2864/2864), done.
@watagashi
watagashi / .vimrc
Last active Jun 14, 2017
TwitVim のプロキシ設定を環境変数から設定 ref: http://qiita.com/watagashi/items/0bd0d4d763ea774d97a5
View .vimrc
if exists('$HTTP_PROXY')
let s:proxy_url_pattern =
\ '^\%(\([^:]*\):\/\/\)\='
\ . '\%(\([^:@]*\)\(:[^@]*\)\=@\)\='
\ . '\([^:]*\)\%(:\(\d*\)\)\=/\=$'
let g:twitvim_proxy = substitute($HTTP_PROXY,
\ s:proxy_url_pattern, '\4:\5', '')
let s:proxy_login = substitute($HTTP_PROXY,
\ s:proxy_url_pattern, '\2', '')
let s:proxy_pass = substitute($HTTP_PROXY,
@watagashi
watagashi / .vimrc
Last active Jun 13, 2017
vim-plug 自身を Windows でも macOS でも自動インストール ref: http://qiita.com/watagashi/items/cf45ffdd7c21655317a2
View .vimrc
let s:vimfiles = expand('<sfile>:p:h')
let s:plugvim = s:vimfiles . '/autoload/plug.vim'
if empty(glob(s:plugvim))
execute "silent !curl -fLo " . s:plugvim . " --create-dirs "
\ . "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
if !empty(glob(s:plugvim))
call plug#begin(s:vimfiles . '/plugged')
View vimplugins.txt
SyntaxComplete
Tail-Bundle
TwitVim
agit.vim
calendar-vim
csv.vim
editorconfig-vim
emmet-vim
gapply.vim
gitv
View _result.txt
% node server.js & node client.js
Server running
{
"host": "localhost:4321",
"accept": "application/json",
"content-type": "application/json",
"content-length": "37",
"connection": "close"
}
body: [{"a":1,"b":true,"c":"x","d":"漢字"}]
@watagashi
watagashi / vimrc
Last active Dec 6, 2016
EditorConfig Vim Plugin を日本語環境の Windows で: 「わ」の日記もどき http://wa.cocolog-enshu.com/pseudodiary/2016/12/editorconfig-vi.html
View vimrc
if has('win32')
let g:EditorConfig_exclude_patterns = ['[^\x01-\x7e]']
endif
@watagashi
watagashi / .gitignore
Created Mar 7, 2016 — forked from octocat/.gitignore
Some common .gitignore configurations
View .gitignore
# https://github.com/github/gitignore/blob/master/Global/Vim.gitignore
# swap
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
# session
Session.vim
# temporary
.netrwhist
*~
@watagashi
watagashi / InstallChocolatey.md
Last active Jan 14, 2016
Install Chocolatey behind authenticated proxy server
View InstallChocolatey.md