Skip to content

Instantly share code, notes, and snippets.

View kana's full-sized avatar

Kana Natsuno kana

View GitHub Profile
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
set diffexpr=MyDiff()
function MyDiff()
let opt = ''
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
@kana
kana / hatokura.txt
Created May 20, 2014 13:00
えむしえれ
「オアシスの美姫エムシエレ」を擁立した時、あなたは
「オアシス都市ネフェルティリ」を獲得し、マーケットのス
タックに「禁制品トークン」3つを自由に置く。あなたのメ
インフェイズ中に、マーケットに置かれた「禁制品トーク
ン」を自由に動かしても良い。「禁制品トークン」が置かれ
たカードの購入コストはトークン1つ毎に+1される。
@kana
kana / hatokura-third-turn.rb
Last active August 29, 2015 14:02
ハトクラ第三ターン産出コイン量分布 〜六都市同盟編〜
def deck_from_spec(spec)
deck = []
spec.each do |name, count|
count.times do
deck << name
end
end
deck
end
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Usage: xsltproc cho45-problem.xslt cho45-problem.xslt
Problem: http://twitter.com/cho45/statuses/874759595
From "3.4 Booleans"
in "XML Path Language (XPath) Version 1.0 W3C Recommendation 16 November 1999"
<http://www.w3.org/TR/1999/REC-xpath-19991116>,
When neither object to be compared is a node-set and the operator is <=, <,
@kana
kana / splatoon-weapon-damage.txt
Last active August 29, 2015 14:23
Splatoonブキダメージ
Splatoon ブキダメージ
ブキ 攻撃力アップ(メイン) 攻撃力アップ(サブ) 防御力アップ ダメージ
わかばシューター 0 0 0 28.0 / 56.0 / 84.0 / 112.0
わかばシューター 0 0 1 26.5 / 53.1 / 79.7 / 106.3
わかばシューター 0 0 2 25.4 / 50.8 / 76.2 / 101.6
わかばシューター 0 0 3 24.5 / 49.0 / 73.5 / 98.0 / 122.5
スプラシューター 0 0 0 36.0 / 72.0 / 108.0
スプラシューター 0 0 1 34.1 / 68.3 / 102.5
require 'rubygems'
require 'highline/import'
require 'mechanize'
agent = WWW::Mechanize.new
login_page = agent.get 'http://www.vim.org/login.php'
_ = ask 'user'
pp _
__END__
@kana
kana / rfunc.vim
Created September 14, 2008 08:50
" Vim global plugin for R user
" Last Change: 2008 Sep 14
" Maintainer: Takao Yokoyama <wakataka423@gmail.com>
" License: This file is placed in the public domain.
if exists('g:loaded_rfunc')
finish
endif
let g:loaded_rfunc = 1
@kana
kana / gist:14316
Created October 2, 2008 08:49 — forked from yoppi/gist:14313
yoppiblog's problem
" quickrun - run a command and show its result quickly
" Author: ujihisa <http://ujihisa.nowa.jp/>
" ModifiedBy: kana <http://whileimautomaton.net/>
if exists('g:loaded_quickrun')
finish
endif
--- Align.vba.orig 2009-10-09 17:11:21.000000000 +0900
+++ Align.vba 2008-10-09 17:10:56.000000000 +0900
@@ -96,7 +96,7 @@
if !hasmapto('<Plug>WrapperStart')
nmap <unique> <SID>WS <Plug>AlignMapsWrapperStart
endif
-nmap <silent> <script> <Plug>AlignMapsWrapperStart :set lz<CR>:call AlignWrapperStart()<CR>
+nnoremap <silent> <Plug>AlignMapsWrapperStart :set lz<CR>:call AlignWrapperStart()<CR>
" ---------------------------------------------------------------------
to upper(aString)
set UPPERCASE to "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
set theResult to characters of aString
repeat with aChar in theResult
set i to offset of aChar in UPPERCASE
if i is not 0 then
set contents of aChar to character i of UPPERCASE
end if
end repeat
return theResult as text