Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Fujiwara Takuya tyru

🏠
Working from home
View GitHub Profile
View gist:161146
"=============================================================================
" Title: VIMua (VIm Mail User Agent)
" File: vimua.vim
" Author: Yasuhiro Matsumoto <mattn_jp@hotmail.com>
" Version: 0.7
"=============================================================================
"-----------------------------------------------------------------------------
" Setting Environments
"-----------------------------------------------------------------------------
View sort_algorithm_sonification.rb
require 'rubygems'
require 'scissor'
n = 10
infile, outfile = ARGV
s = Scissor(infile) / n
result = Scissor()
target = (0 .. n - 1).to_a.sort_by { rand }
@tily
tily / input.txt
Created Jan 7, 2010
make text stammer
View input.txt
文字を読みながら、そこに表現されてある音響が、いつまでも耳にこびりついて、離れないことがあるだらう。オセロオであつたか、ほかの芝居であつたか、しらべてみれば、すぐ判るが、いまは、もの憂く、とにかくシエクスピア劇のひとつであることは間違ひない、とだけ言つて置いて、その芝居の人殺しのシイン、寝室でひそかに女をしめ殺して、ヒロオも、われも、瞬時、ほつと重くるしい溜息。額の油汗拭はむと、ぴくとわが硬直の指うごかした折、とん、とん、部屋の外から誰やら、ドアをノツクする。ヒロオは、恐怖のあまり飛びあがつた。ノツクは、無心に、つづけられる。とん、とん、とん、とん、ヒロオは、その場で気が狂つたか、どうか、私はその後の筋書を忘れてしまつた。
@draegtun
draegtun / meta_perl6.pl
Created Jan 13, 2010
Perl6 metaprogramming example
View meta_perl6.pl
#!/usr/bin/env perl6
# see:
# * http://transfixedbutnotdead.com/2010/01/13/anyone_for_metaprogramming/
# * http://transfixedbutnotdead.com/2010/01/14/anyone-for-perl-6-metaprogramming/
# * http://fingernailsinoatmeal.com/post/292301859/metaprogramming-ruby-vs-javascript
# * http://transfixedbutnotdead.com/2010/10/31/perl6-metaprogramming-update/
# below runs on Rakudo Star (2010.10 release).
View perlvalidate.vim
function! s:package_name()
let mx = '^\s*package\s\+\([^ ;]\+\)'
for line in getline(1, 5)
if line =~ mx
return substitute(matchstr(line, mx), mx, '\1', '')
endif
endfor
return ""
endfunction
@uasi
uasi / fastpack.sh
Created Apr 30, 2010
fastpack - a simple App::FatPacker helper
View 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
@anekos
anekos / buffered-multiple-hints.vimp
Created May 17, 2010
;F で開くべきタブをバッファし、最後に一気に開く
View buffered-multiple-hints.vimp
js <<EOM
liberator.registerObserver(
'enter',
function () {
let scheduled = [];
plugins.libly.$U.around(
events,
'onEscape',
function (next) {
try {
View skk.scm
;; g:eskk_revert_henkan_style = "eskk"
;; http://github.com/tyru/eskk.vim/commit/a962f27d868c902415c364df8a7cb0d0d8018bcc
;; Thank you very much, tyru!
(define skk-back-to-kanji-state
(lambda (sc)
(let ((skk (lambda (sc)
(skk-context-set-state! sc 'skk-state-kanji)
(skk-context-set-okuri-head! sc "")
(if (not (null? (skk-context-okuri sc)))
(begin
@h1mesuke
h1mesuke / conque_term_settings.vim
Created Jun 23, 2010
Vim - My current settings for ConqueTerm
View conque_term_settings.vim
" Conque
" http://www.vim.org/scripts/script.php?script_id=2771
" ~/.vim/after/ftplugin/conque_term.vim
augroup MyConqueTerm
autocmd!
" start Insert mode on BufEnter
autocmd BufEnter *
\ if &l:filetype ==# 'conque_term' |
View decode_hitode909.user.js
// ==UserScript==
// @name decode hitode909
// @namespace http://d.hatena.ne.jp/send/
// @description twitter filter
// @include http://twitter.com/*
// @include http://mobile.twitter.com/*
// ==/UserScript==
//
(function (){