Skip to content

Instantly share code, notes, and snippets.

View supermomonga's full-sized avatar
🏠
Working from home

supermomonga supermomonga

🏠
Working from home
View GitHub Profile
# Building/installing the docker client on OS X: https://groups.google.com/forum/#!msg/docker-user/8m0Eh5nw-1U/J3SGYXqn1OMJ
$ go version
go version go1.2 darwin/amd64
$ go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
「はじめましてだな、ビム!」
「抱きしめたいな、ビム!」
「これでビムと戦える。見事な対応だ、プレジデント!」
「身持ちが固いな、ビム!」
「柔肌を晒すとは、破廉恥だぞ、ビム!」
「堪忍袋の緒が切れた!許さんぞビム!」
「会いたかった…会いたかったぞビム!」
「よく言った!ビム!」
if neobundle#tap('vim-smartinput')
call neobundle#config({
\ 'autoload' : {
\ 'insert' : 1
@supermomonga
supermomonga / run.sh
Created October 23, 2013 05:42
craftbukkit run shell script
#!/bin/bash
cd "$( dirname "$0" )"
java -Xmx1024M -jar craftbukkit.jar -o true
" Prompt sample:
" octave-3.2.3:2>
let g:quickrun_config.matlab = {
\ 'command' : 'octave',
\ 'cmdopt' : '--silent --persist',
\ 'hook/cd' : 1,
\ 'runner' : 'process_manager',
\ 'runner/process_manager/load' : '%S:t:r',
\ 'runner/process_manager/prompt': 'octave-[0-9\.]\+:\d\+>\s',
\ }
let g:socket_test_ruby_port = 12345
let g:socket_test_ruby_path = 'ruby'
let g:socket_test_ruby_script_path = './socket.rb'
function! g:socket_test_send(command)
let sock = vimproc#socket_open('localhost', g:socket_test_ruby_port)
call sock.write(a:command)
call sock.close()
endfunction

OmniRuby

Omni completion engine for Ruby

初期リリースの草案です(草案)

機能,コンセプト

  • 標準クラス及び現在のファイル内で定義されたクラスのメンバをオムニ補完
def primes_to(x, ns = 2.upto(x).to_a, ps = [], to = Math.sqrt(x))
ns.first.tap { |p| break p.nil? ? 0 : p > to ? ps + ns : primes_to(x, ns.reject{ |n| n % p == 0 }, ps << p) }
end
def prime_count x
primes_to(x).size
end
[2, 5, 10, 19, 54, 224, 312, 616, 888, 977, 1000000].each do |x|
# coding: utf-8
require 'mechanize'
require 'nokogiri'
require 'json'
m = Mechanize.new
m.user_agent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.16 Safari/537.36'
set nocompatible
filetype off
if has('vim_starting')
set runtimepath+=~/.vim/debug/bundle/neobundle.vim
endif
call neobundle#rc(expand('~/.vim/debug/bundle/'))
NeoBundle 'Shougo/vimproc.vim', { 'build' : {
\ 'windows' : 'mingw32-make -f make_mingw32.mak',
\ 'cygwin' : 'make -f make_cygwin.mak',
\ 'mac' : 'make -f make_mac.mak',