Skip to content

Instantly share code, notes, and snippets.

autocmd FileType unite call s:unite_my_settings()
function! s:unite_my_settings()"{{{
nmap <buffer> <Tab> <Plug>(unite_choose_action)<Plug>(unite_insert_enter)
imap <buffer> <Tab> <Plug>(unite_choose_action)<Plug>(unite_insert_enter)
endfunction"}}}
nnoremap <expr> [unite]S ':<C-u>Unite file file/new -input=' . 'spec/'. expand('%:h'). '/'. substitute(expand('%:t'), ".rb", "_spec.rb", "") . '<CR>'
// for slides.com slide presentation
jQuery(window).mousedown(function(e){
if ( jQuery(e.target).hasClass("navigate-left") || jQuery(e.target).hasClass("navigate-right") ) {
return;
}
e.preventDefault();
if(e.button == 2){
Reveal.left();
}else {
Reveal.right();
@vimtaku
vimtaku / gist:94cef31a166921b9b7f2
Created February 3, 2015 13:01
Datomic free 0.9.5130
## copy from https://registry.hub.docker.com/u/colinrymer/docker-datomic-free/ and change a little.
# Datomic Free v0.9.5130
#
# It's public image to run datomic database on docker container.
FROM dockerfile/java
MAINTAINER Timo Sulg, timo@tauho.com
#-- INSTALL PREREQURIEMENTS
var casper = require('casper').create({
clientScripts:['jquery.min.js'],
});
phantom.injectJs('jquery.min.js');
casper.start('http://mixi.jp/', function() {
this.fill('form[name="login_form"]', {
email: '',
password: ''
}, true);
var casper = require('casper').create({
clientScripts:['jquery.min.js'],
});
phantom.injectJs('jquery.min.js');
casper.start('http://mixi.jp/', function() {
this.fill('form[name="login_form"]', {
email: '',
password: ''
}, true);
@vimtaku
vimtaku / .pryrc
Created December 5, 2015 07:27
rails console で m select * from users; とかできるようにするスニペット
class Pry
class Command::MySQLQueryCommand < Pry::ClassCommand
match(/m\s+(.*)/)
description "execute mysql command line"
banner <<-'BANNER'
Usage: m SQLCOMMAND
ex) m select * from users;
BANNER
@@config = YAML.load_file("config/database.yml")
@vimtaku
vimtaku / unity_reference_switch
Last active December 17, 2015 11:39
unity reference default select
// ==UserScript==
// @name unity_reference_switch
// @namespace unity_reference_switch
// @include http://docs.unity3d.com/Documentation/ScriptReference/*.html
// @version 1
// @grant none
// ==/UserScript==
(function() {
var selectLanguage = "C#";
--color
--format documentation
--require spec_helper
--color
--format documentation
--require spec_helper