Skip to content

Instantly share code, notes, and snippets.

View FGtatsuro's full-sized avatar

FGtatsuro FGtatsuro

View GitHub Profile
*** snipMate.vim.old 2009-04-23 02:30:12.703125000 +0900
--- snipMate.vim 2009-04-23 01:41:56.890625000 +0900
***************
*** 187,190 ****
--- 187,202 ----
let num = inputlist(snippet) - 1
return num == -1 ? '' : s:multi_snips[a:scope][a:trigger][num][1]
endf
+
+ fun GetSnippetsList(ft)
@FGtatsuro
FGtatsuro / install_homebrew.rb
Created January 20, 2012 19:16 — forked from mxcl/install_homebrew.markdown
Installs Homebrew to /usr/local so you don't need sudo to `brew install`
#!/usr/bin/ruby
# This script installs to /usr/local only. To install elsewhere you can just
# untar https://github.com/mxcl/homebrew/tarball/master anywhere you like.
module Tty extend self
def blue; bold 34; end
def white; bold 39; end
def red; underline 31; end
def reset; escape 0; end
def bold n; escape "1;#{n}" end
@FGtatsuro
FGtatsuro / GenericListConverterSample
Created January 13, 2012 16:34 — forked from nagise/GenericListConverterSample
ジェネリックなListの詰替えサンプル
public static <T,U> List<U> hoge(List<T> in) {
class InstanceGenerator<X> {
X instance(X ... x) throws InstantiationException, IllegalAccessException {
Class<?> xArrayClass = x.getClass();
Class<X> xClass = (Class<X>) xArrayClass.getComponentType();
return xClass.newInstance();
}
}
InstanceGenerator<U> d = new InstanceGenerator<U>();
List<U> out = new ArrayList<U>();
#-*- coding:utf-8 -*-
"""
This script compare a package installed by pip and the latest version
in PyPI. And it is also possible to upgrade it then and there.
For now work on Windows and Linux.
And I'm not MACer.(Probably run.)
require: Python 2.6, 2.7 or 3.x
If you using Python 2.5 or below, check at gist:1153625