Skip to content

Instantly share code, notes, and snippets.

View tyru's full-sized avatar
🏠
Working from home

Fujiwara Takuya tyru

🏠
Working from home
View GitHub Profile
@tyru
tyru / function-type-test.js
Created February 12, 2016 15:36 — forked from davidosomething/function-type-test.js
Various function styles for testing
/*eslint-env es6*/
// ES6 generator function
var anonymousGeneratorFunctionExpression = function* (arg1, arg2) {
};
var namedGeneratorFunctionExpression = function* namedGenerator(arg1, arg2) {
};
@tyru
tyru / .vimrc
Last active January 10, 2016 00:18 — forked from hinagishi/.vimrc
if has('vim_starting')
set rtp+=~/.vim/bundle/vivacious.vim
endif
filetype plugin indent on
call vivacious#bundle()
set fileencodings=utf-8,iso-2022-jp,cp932,sjis,euc-jp
@tyru
tyru / Changes
Created June 7, 2012 16:23 — forked from mattn/Changes
修正予定な箇所
9ee1a32
Data.String: diffidx does not handle multi-byte string.
b2bbfdd
add modeline (see #21 for the discussion)
3bb4cee
Fixed detecting case-insensitive system.
@tyru
tyru / rpn.hs
Created December 19, 2011 05:14 — forked from anonymous/rpn.hs
import qualified Data.Char as Ctype
main = do cs <- getContents
putStr $ unlines $ map (show . calculate . parse) $ lines cs
calculate :: [Token] -> Int
calculate cs = calculate' [] cs
where
@tyru
tyru / pn.hs
Created December 19, 2011 01:24 — forked from anonymous/pn.hs
Polish Notation
import qualified Data.Char as Ctype
main = do cs <- getContents
print $ calculate $ parse cs
-- TODO: op n1 n2 以外の式にも対応
calculate :: [Token] -> Int
calculate (op:n1:n2:rest) =
@tyru
tyru / mergesort.hs
Created December 19, 2011 01:15 — forked from anonymous/mergesort.hs
Haskell MergeSort Implementation
import qualified Data.List as L
testList = [5,3,1,1,2,-1,0,33,10]
main = print $ mergeSort testList `isSameAs` L.sort testList
isSameAs = (==)
mergeSort :: (Ord a) => [a] -> [a]
function! s:is_cmdwin()
let save_ei = &eventignore
set eventignore=all
try
wincmd n
wincmd q
return 0
catch
return 1
finally
set rtp+=~/.vim/bundle/eskk.vim,~/.vim/bundle/savemap.vim,~/.vim/bundle/vice.vim
if has('vim_starting')
augroup vimrc
autocmd!
augroup END
autocmd vimrc User eskk-initialize-pre call s:eskk_initial_pre()
function! s:eskk_initial_pre() "{{{
let t = eskk#table#new('rom_to_hira*', 'rom_to_hira')
@tyru
tyru / gist:934218
Created April 21, 2011 11:19 — forked from VoQn/gist:925581
# Install Common Vim environment
ln -fs $PWD/vim/vimrc.vim $HOME/.vimrc
ln -fs $PWD/vim/gvimrc.vim $HOME/.gvimrc
# Create Vimfiles Directory
mkdir $HOME/.vim
# Added Local Environment vimfiles Setting
mkdir $HOME/.vim/runtime
touch $HOME/.vim/runtime/vimrc.vim