Skip to content

Instantly share code, notes, and snippets.

View kana's full-sized avatar

Kana Natsuno kana

View GitHub Profile
@kana
kana / 1st-push.log
Created November 2, 2011 08:54
HelloAppHarbor
Build e5a07b108497be8cded92e3fe7c2231e256ddca9
Back to HelloAppHarbor Download build
Log
11/2/2011 5:46:23 PM: Received pack, queuing build
11/2/2011 5:47:24 PM: Starting build
11/2/2011 5:47:26 PM: 0 warnings
11/2/2011 5:47:26 PM: Build completed in 1.95 seconds (show/hide details)
11/2/2011 5:47:33 PM: Build successfully deployed
@kana
kana / smartchr.xire
Created November 5, 2011 18:34
smartchr.xire
(function (smartchr#loop ...)
(return (smartchr#_expand #t ...)))
(function (smartchr#one_of ...)
(return (smartchr#_expand #f ...)))
(define s:DEFAULT-CONTEXT (dict))
(function (smartchr#_expand loop-p args)
(let* ([last-arg (ref args -1)]
@kana
kana / 00-reproduce.sh
Created November 7, 2011 16:25
Vim: :doautocmd trap
rm -f *.log
vim -u NONE -i NONE -N -c 'source case-1.vim'
vim -u NONE -i NONE -N -c 'source case-2.vim'
@kana
kana / watchr.rb
Created November 12, 2011 08:48
Poor man's CI
managed_files = `git ls-files`.split("\n")
watch /.*/ do |m|
if managed_files.include?(m[0]) then
system '
echo "------------------------------------------------------------"
if prove --failures --comments
then
say -v "Good News" "Success!"
else
@kana
kana / SleepSortWithReactiveExtensions.cs
Created November 16, 2011 08:01
Sleep sort with Reactive Extensions
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
namespace RxHello
{
public static class EnumerableExtensions
{
public static IObservable<T> OrderBySleepSort<T>(this IEnumerable<T> xs, Func<T, int> keySelector)
@kana
kana / luxion-foldtext-for-cpp.vim
Created February 4, 2012 08:09
ハイパー @luxion 'foldtext' #vim
autocmd FileType cpp setlocal foldtext=MyFoldTextForCpp()
function! MyFoldTextForCpp()
return substitute(getline(v:foldstart + 1), '^\s*', '/* ', '')
endfunction
@kana
kana / memo.txt
Created February 22, 2012 02:26
vim-smartpunc memo
```
call smartpunc#map_to_trigger('<Plug>(physical-key-;)', '<Enter>', '<Enter>')
call smartpunc#map_to_trigger('<Plug>(physical-key-:)', '<S-Enter>', '<S-Enter>')
call smartpunc#map_to_trigger('<Plug>(physical-key-<CR>)', ';', ';')
call smartpunc#map_to_trigger('<Plug>(physical-key-<S-CR>)', ':', ':')
```
Review conflicted trigger keys.
Operators:
@kana
kana / t1.profile
Created February 22, 2012 16:09
vim-smartpunc profiling result
SCRIPT /Users/kana/working/vim-smartpunc/plugin/smartpunc.vim
Sourced 1 time
Total time: 3.099673
Self time: 0.000369
count total (s) self (s)
" smartpunc - Smart input assistant for punctuations
" Version: 0.0.0
" Copyright (C) 2012 Kana Natsuno <http://whileimautomaton.net/>
" License: So-called MIT/X license {{{
before :each do
@tmp_dir = create_temporary_directory()
end
after :each do
remove_temporary_directory(@tmp_dir)
end
23 vim
20 doll
4 tech
4 i-met
4 engineer
3 who-i-met
3 met
3 g1983ers
2 twizard-magic-list
2 programmer