Skip to content

Instantly share code, notes, and snippets.

View naokirin's full-sized avatar

naokirin(Naoki Hayashida) naokirin

View GitHub Profile
@naokirin
naokirin / gist:71a77e9770458a04b88f
Last active August 29, 2015 14:16
fugitive (git grep) + unite-quickfix
NeoBundle "osyo-manga/unite-quickfix.git"
" ------ unite-quickfix ------
command UniteQuickFix Unite -no-quit -vertical -winwidth=40 -max-multi-lines=1 quickfix
function! s:open_quickfix_with_ggrep(...)
let _ = join(a:000, " ")
execute ":Ggrep "._ | redraw!
if (len(getqflist()) > 0)
execute ":UniteQuickFix"
endif
NeoBundle 'rhysd/vim-clang-format'
NeoBundle 'Shougo/vimproc'
NeoBundle 'itchyny/lightline.vim'
NeoBundle "thinca/vim-quickrun"
NeoBundle "osyo-manga/shabadou.vim"
NeoBundle "osyo-manga/vim-watchdogs"
NeoBundle "jceb/vim-hier"
NeoBundle "yonchu/quickfixstatus"
" :WatchdogsRun後にlightline.vimを更新
@naokirin
naokirin / git-now
Created June 21, 2013 11:14
git-now + adding only specific file (--managed)
#!/bin/sh
PREFIX="from now"
MESSAGE="[${PREFIX}] `date +\"%Y/%m/%d %T\"`"
get_amend() {
if [ -z `git log --pretty=oneline -1 | cut -d " " -f 2- | grep "^\[${PREFIX}]"` ]
then
return 1
fi
#!/bin/bash
# require package : inotify-tools
exclude=(--exclude \~ --exclude \.swp --exclude \.git/)
events=(-e CREATE -e MODIFY -e MOVED_TO -e DELETE)
if [ $# -eq 0 ]; then
echo 'start polling'
" Vi互換オフ
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
Bundle 'gmarik/vundle'
@naokirin
naokirin / oCamlet.ml
Created August 3, 2012 10:31
OCamlet (OCaml toy testing framework)
module Result = OCamlet_test_result
module Unit_test = OCamlet_test
include Unit_test.Test_poly
include Unit_test.Test_exn
let run_test_case c =
let open Result in
let result_unit x y =
@naokirin
naokirin / JavaFXMemo.java
Created April 15, 2012 03:37
JavaFXMemo05
import javafx.application.Application;
import javafx.application.Platform;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
import javafx.scene.control.TextArea;
import javafx.scene.control.Button;
@naokirin
naokirin / JavaFXMemo.java
Created April 15, 2012 02:45
JavaFXMemo04
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
import javafx.scene.control.TextArea;
import javafx.scene.control.Button;
import javafx.scene.layout.HBox;
@naokirin
naokirin / JavaFXMemo.java
Created April 15, 2012 02:30
JavaFXMemo03
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
import javafx.scene.control.TextArea;
import javafx.scene.control.Button;
import javafx.scene.layout.HBox;
@naokirin
naokirin / JavaFXMemo.java
Created February 4, 2012 20:43
JavaFXMemo02
import javafx.application.Application;
import javafx.stage.Stage;
import javafx.scene.Scene;
import javafx.scene.control.TextField;
import javafx.scene.layout.VBox;
import javafx.scene.control.TextArea;
import javafx.scene.control.Button;
import javafx.scene.layout.HBox;
public class JavaFXMemo extends Application {