Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Fujiwara Takuya tyru

🏠
Working from home
View GitHub Profile
View vimlparser.diff
--- translua-vim/autoload/vimlparser.vim Tue Jul 1 21:12:04 2014
+++ vim-vimlparser/autoload/vimlparser.vim Tue Jul 1 21:12:56 2014
@@ -191,6 +191,7 @@
let s:TOKEN_SEMICOLON = 61
let s:TOKEN_BACKTICK = 62
let s:TOKEN_DOTDOTDOT = 63
+let s:TOKEN_SHARP = 64
let s:MAX_FUNC_ARGS = 20
View run-spec-on-windows.txt
$ spec.bat /p ..\vimproc
Testing... C:\Users\takuya\Documents\GitHub\dotfiles\dotfiles\.vim\bundle\vital.
vim\spec\bitwise.vim
Testing... C:\Users\takuya\Documents\GitHub\dotfiles\dotfiles\.vim\bundle\vital.
vim\spec\date_time.vim
Testing... C:\Users\takuya\Documents\GitHub\dotfiles\dotfiles\.vim\bundle\vital.
vim\spec\math.vim
Testing... C:\Users\takuya\Documents\GitHub\dotfiles\dotfiles\.vim\bundle\vital.
vim\spec\option_parser.vim
Testing... C:\Users\takuya\Documents\GitHub\dotfiles\dotfiles\.vim\bundle\vital.
View [stdin]@1
diff --git a/autoload/vital/__latest__/Vim/Buffer.vim b/autoload/vital/__latest__/Vim/Buffer.vim
index 1384298..9283b9a 100644
--- a/autoload/vital/__latest__/Vim/Buffer.vim
+++ b/autoload/vital/__latest__/Vim/Buffer.vim
@@ -10,9 +10,21 @@ function! s:_vital_depends()
return ['Prelude']
endfunction
-function! s:is_cmdwin()
- return bufname('%') ==# '[Command Line]'
@tyru
tyru / spec-vim-buffer.vim
Last active Aug 29, 2015
Empty CmdWin Bufname
View spec-vim-buffer.vim
scriptencoding utf-8
source spec/base.vim
let g:VB = vital#of('vital').import('Vim.Buffer')
Context Vim.Buffer.is_cmdwin()
It detects if current window is cmdwin.
" normal! q:
let save_cedit = &cedit
let &cedit = "<C-f>"
View make-wifi-as-default-route.bat
REM @echo off
REM ====================================================================
REM 複数NICでのデフォルトゲートウェイ設定方法
REM http://www.maruko2.com/mw/%E8%A4%87%E6%95%B0NIC%E3%81%A7%E3%81%AE%E3%83%87%E3%83%95%E3%82%A9%E3%83%AB%E3%83%88%E3%82%B2%E3%83%BC%E3%83%88%E3%82%A6%E3%82%A7%E3%82%A4%E8%A8%AD%E5%AE%9A%E6%96%B9%E6%B3%95
REM ====================================================================
REM set PERSISTENT=-p
REM From "route print"
View run-vimgrep.wsf
<job id="run-vimgrep">
<script language="JavaScript">
var fs = new ActiveXObject("Scripting.FileSystemObject");
var sh = new ActiveXObject("WScript.Shell");
// オープンモード
var FORREADING = 1; // 読み取り専用
var FORWRITING = 2; // 書き込み専用
var FORAPPENDING = 8; // 追加書き込み
View go-get-hub
Nihongo Yet Another Open Shell 3.3.9_0 (c) 2001-13 by HAYAMA,Kaoru
[C:\Users\takuya]
$ go get github.com/github/hub
# cd .; hg clone -U https://bitbucket.org/kardianos/osext C:\home\gopath\src\bitbucket.org\kardianos\osext
Traceback (most recent call last):
File "c:\Python26\lib\site-packages\py2exe\boot_common.py", line 92, in <module>
ImportError: No module named linecache
Traceback (most recent call last):
File "<install zipextimporter>", line 1, in <module>
ImportError: No module named zipextimporter
@tyru
tyru / BenchmarkMain.java
Last active Aug 29, 2015
『Re: InputStreamからStringへの変換』の記事のコードはNIO使えばもっと速くなるんじゃないかと思ってベンチマーク取ってみた
View BenchmarkMain.java
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.nio.ByteBuffer;
import java.nio.channels.Channels;
@tyru
tyru / timedatectl
Created Apr 4, 2015
timedatectl segfault
View timedatectl
$ sudo timedatectl
Local time: Sat 2015-04-04 05:33:35 UTC
Universal time: Sat 2015-04-04 05:33:35 UTC
RTC time: n/a
Time zone: UTC (UTC, +0000)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
*** Error in `timedatectl': free(): invalid next size (fast): 0xb81058d8 ***
======= Backtrace: =========
View create-alarmpi.sh
#!/bin/bash
set -eu
#set -x
# via http://archlinuxarm.org/platforms/armv6/raspberry-pi
DISK=/dev/sdb
PARTITION=yes
MKFS=yes
CACHE_DIR=/var/cache