Skip to content

Instantly share code, notes, and snippets.

View kana's full-sized avatar

Kana Natsuno kana

View GitHub Profile
@kana
kana / gist:1094888
Created July 20, 2011 12:43
Vim Version Manager
kana@avril ~/working/vim-version-manager (2) [master]
YUKI.N> vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jul 20 2011 21:39:43)
MacOS X (unix) version
Included patches: 1-233
Compiled by [email protected]
Huge version without GUI. Features included (+) or not (-):
+arabic +autocmd -balloon_eval -browse ++builtin_terms +byte_offset +cindent
-clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+conceal +cryptv -cscope +cursorbind +cursorshape +dialog_con +diff +digraphs
nnoremap <Leader>pa :<C-u>call PerlReplacePackageName()<CR>
function! PerlPackageNameFromFile()
let filename = expand('%:p')
let package = substitute(filename, '^.*/lib/', '', '')
let package = substitute(package, '\.pm$', '', '')
let package = substitute(package, '/', '::', 'g')
return package
endfunction
@kana
kana / MaybeTest.cs
Created June 22, 2011 10:07
Monad in C# (work in progress)
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using MonadSharp;
namespace Test
{
[TestClass()]
public class Test
{
@kana
kana / gist:1033263
Created June 18, 2011 16:48
MacBook + WiMAX (UD01NA) = XXX
MacBookにWiMAXのUD01NAのドライバなんだかなんだかをインストールする
→UD01NAでインターネット接続できるようにする
→Internet Sharingを有効にする(AirPortからUD01NAへ)
→iPad 2からMacBookのAirPort経由でインターネット接続できるようにする
→iPad 2からインターネットへ向けてパケットを送信する
→MacBookがクライマックス
100%再現する。うわあああ
<title>title</title>
<p>p</p>
try ResourceSpecification
Block
{
final VariableModifiers_minus_final R #resource = Expression;
Throwable #primaryException = null;
try ResourceSpecificationtail
Block
catch (final Throwable #t) {
@kana
kana / minq.cs
Created May 26, 2011 10:15
Learning LINQ by reimplementing
[TestClass()]
public class IMyEnumerableTest
{
[TestMethod()]
public void MyCastTest()
{
var xs = new [] {1, 2, 3}.MyCast();
Assert.IsTrue(xs is IMyEnumerable<Int32>);
var i = 1;
@kana
kana / gist:975959
Created May 17, 2011 04:32
FileType test
" comment
; comment
# comment
--- s.vim.before 2011-05-14 14:12:34.000000000 +0900
+++ s.vim.after 2011-05-14 14:12:27.000000000 +0900
@@ -21,7 +21,6 @@
" Basic {{{
-"set no compatible
set nocompatible
"reset
@kana
kana / gist:955336
Created May 4, 2011 14:46
Strange behavior of Ruby Dir.glob on Mac OS X 10.5
$ uname
Darwin
$ mount
/dev/disk0s2 on / (hfs, local, journaled)
devfs on /dev (devfs, local)
fdesc on /dev (fdesc, union)
map -hosts on /net (autofs, automounted)
map auto_home on /home (autofs, automounted)