Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Fujiwara Takuya tyru

🏠
Working from home
View GitHub Profile
@tyru
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
endif
filetype plugin indent on
call vivacious#bundle()
set fileencodings=utf-8,iso-2022-jp,cp932,sjis,euc-jp
@tyru
tyru / Changes
Created Jun 7, 2012 — forked from mattn/Changes
修正予定な箇所
View 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.
View find-broken-symlink.sh
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
where
@tyru
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
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
try
wincmd n
wincmd q
return 0
catch
return 1
finally
View eskktest.vim
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')
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