Skip to content

Instantly share code, notes, and snippets.

Working from home

Fujiwara Takuya tyru

Working from home
View GitHub Profile
tyru / function-type-test.js
Created Feb 12, 2016 — forked from davidosomething/function-type-test.js
Various function styles for testing
View function-type-test.js
/*eslint-env es6*/
// ES6 generator function
var anonymousGeneratorFunctionExpression = function* (arg1, arg2) {
var namedGeneratorFunctionExpression = function* namedGenerator(arg1, arg2) {
View .vimrc
if has('vim_starting')
set rtp+=~/.vim/bundle/vivacious.vim
filetype plugin indent on
call vivacious#bundle()
set fileencodings=utf-8,iso-2022-jp,cp932,sjis,euc-jp
tyru / Changes
Created Jun 7, 2012 — forked from mattn/Changes
View Changes
Data.String: diffidx does not handle multi-byte string.
add modeline (see #21 for the discussion)
Fixed detecting case-insensitive system.
View 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
tyru / pn.hs
Created Dec 19, 2011 — forked from anonymous/pn.hs
Polish Notation
View pn.hs
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 / mergesort.hs
Created Dec 19, 2011 — forked from anonymous/mergesort.hs
Haskell MergeSort Implementation
View mergesort.hs
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]
View is-cmdwin.vim
function! s:is_cmdwin()
let save_ei = &eventignore
set eventignore=all
wincmd n
wincmd q
return 0
return 1
View eskktest.vim
set rtp+=~/.vim/bundle/eskk.vim,~/.vim/bundle/savemap.vim,~/.vim/bundle/vice.vim
if has('vim_starting')
augroup vimrc
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')
View gist:934218
# 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