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 / fastpack
Created March 19, 2011 15:47 — forked from uasi/fastpack.sh
#!/bin/sh
#
# fastpack - a simple App::FatPacker helper
#
if [ -z "$1" ]; then
echo "usage: fastpack script.pl > script.packed.pl"
exit 0
fi
@tyru
tyru / thincr.rb
Created February 10, 2011 09:14 — forked from ujihisa/thincr.rb
require 'uri'
require 'mechanize'
require 'rubytter'
module Thincr
class << self
AT = ['', '']
LINGR = ['', '']
OA = ['tNJwVPsE56fw8Nh4mmc9g', 'Zr95pR8m94l8sBoWAJtdoN1Z31wQrXfaabqzOhO5Wyk']
nnoremap <silent> ) :<C-u>call search("\\((\\|\\[\\|{\\|<\\|縲圭\|縲蚕\)\\zs")<CR>
nnoremap <silent> ( :<C-u>call search("\\((\\|\\[\\|{\\|<\\|縲圭\|縲蚕\)\\zs", 'b')<CR>
@tyru
tyru / gist:708854
Created November 21, 2010 16:07 — forked from Shougo/gist:708762
" eskk.vim"{{{
if !exists('g:eskk#disable') || !g:eskk#disable
" Disable skk.vim
let g:plugin_skk_disable = 1
let g:eskk#disable = 0
let g:eskk#debug = 0
" Don't keep state.
let g:eskk#keep_state = 0
@tyru
tyru / numlock.vim
Created September 22, 2010 23:41 — forked from oriolgual/numlock.vim
" Add it to your local vimrc
" Toggle it with Shift+n
let g:numberlock = 0
" Tried with inoremap 1 <S-1> but it wasn't working, so we'll have to set different layouts
" Anyone knows how to fix it?
let g:numberlock_layout = 'us'
nnoremap <silent><S-n> :call NumberLock()<CR>
function! NumberLock()
function! SetBufLine(expr, lnum, text)
let oldnr = winnr()
let winnr = bufwinnr(a:expr)
try
if oldnr == winnr
silent! call setline(a:lnum, a:text)
elseif winnr ==# -1
silent split
silent execute bufnr(a:expr) 'buffer'
@tyru
tyru / zero.vim
Created July 22, 2010 17:30 — forked from mattn/zero.vim
" http://d.hatena.ne.jp/os0x/20081115/1226770265
echo len(substitute(join(range(1001)), '[^0]', '', 'g'))
@tyru
tyru / .vimrc
Created July 14, 2010 14:16 — forked from mmisono/.vimrc
submode: changing window size
call submode#enter_with('winsize', 'n', '', 'mws', ':<C-u>call VimrcSubmodeResizeWindow()<CR>')
call submode#leave_with('winsize', 'n', '', '<Esc>')
function! VimrcSubmodeResizeWindow()
let curwin = winnr()
wincmd j | let target1 = winnr() | exe curwin "wincmd w"
wincmd l | let target2 = winnr() | exe curwin "wincmd w"
execute printf("call submode#map ('winsize', 'n', 'r', 'j', '<C-w>%s')", curwin == target1 ? "-" : "+")
execute printf("call submode#map ('winsize', 'n', 'r', 'k', '<C-w>%s')", curwin == target1 ? "+" : "-")
(function () {
if (prompt() == 'ujihisa') {
var Ujihisa = new Function();
Ujihisa.prototype.hi = function () { alert("my name is ujihisa"); };
var the_class = Ujihisa;
}
else {
var Ujm = new Function();
Ujm.prototype.hi = function () { alert("this is a pen"); };
var the_class = Ujm;
@tyru
tyru / r.scm
Created June 24, 2010 18:48 — forked from mattn/r.go
(R)
(define R
(lambda ()
(print "商標登録です。")
R))
(((((R)))))