Skip to content

Instantly share code, notes, and snippets.

View gongo's full-sized avatar

Wataru MIYAGUNI gongo

View GitHub Profile
@gongo
gongo / gist:4204513
Created December 4, 2012 14:32
こういうコード書いててだいぶつらい
public class Ring extends HBox {
/**
* リングを見守る監視カメラ
*/
private MuscleSensor sensor = MuscleSensor.instance();
/**
* 選手入場口
*/
@gongo
gongo / 50_quickrun.el
Created November 15, 2012 00:53
emasc-quickrun でリモートサーバの PHP を使いたい時の設定
(require 'quickrun)
;; 事前に公開鍵登録とかいろいろして
;; パスフレーズ無しの ssh ログインを可能にしておく
(quickrun-add-command "php-for-remote"
'((:command . "ssh remote-sv 'php'")
(:exec . ("%c < %s"))
(:compile-only . "%c -l < %s") ;; syntax check
(:description . "Run PHP script")))
@gongo
gongo / term-plus-el.rcp
Created October 20, 2012 07:08
term-plus-el の el-get recipe
(:name term-plus-el
:description "term-mode enhancement"
:type github
:pkgname "tarao/term-plus-el"
:build `(("git" "submodule" "update" "--init")
("make" ,(format "EMACS=%s" el-get-emacs) "compile"))
:post-init (let ((libdir (concat (el-get-package-directory "term-plus-el") "/lib")))
(add-to-list 'load-path libdir)
(add-to-list 'load-path (concat libdir "/anything-config/extensions"))
(load-library "subdirs.el")
@gongo
gongo / yamada-compile-file.el
Created September 13, 2012 00:21
byte-compile-file 中に山田を踊らせようとしたが、踊ってくれない
(defun yamada-compile-file (filename &optional load)
(interactive
(let ((file buffer-file-name)
(file-name nil)
(file-dir nil))
(and file
(derived-mode-p 'emacs-lisp-mode)
(setq file-name (file-name-nondirectory file)
file-dir (file-name-directory file)))
(list (read-file-name (if current-prefix-arg
$ export HOMEBREW_LIB="$HOME/.homebrew/lib"
$ export HOMEBREW_ETC="$HOME/.homebrew/etc"
$ brew install libusb --universal
$ brew install https://raw.github.com/totakke/openni-formula/master/openni.rb --devel
$ sudo mkdir -p /var/lib/ni
$ sudo niReg $HOMEBREW_LIB/libnimMockNodes.dylib
$ sudo niReg $HOMEBREW_LIB/libnimCodecs.dylib
$ sudo niReg $HOMEBREW_LIB/libnimRecorder.dylib
@gongo
gongo / Gemfile
Created August 28, 2012 14:12
ジョージアシールを入力してもらって、web.rb と同じディレクトリにある serial.txt にどんどん追記していく
source :rubygems
gem 'sinatra'
gem 'thin'
gem 'haml'
gem 'shotgun', :group => 'development'
@gongo
gongo / dbd-oracle-install-on-ubuntu1204.org
Created August 15, 2012 13:43
Install document of DBD::Oracle on Ubuntu 12.04
@gongo
gongo / README
Created August 9, 2012 09:40
define-key に動的?な引数付き関数をセットしたい場合のなんか良い感じの手法教えてください
QA@IT にもマルチポストしてみたところ、期待通りの動きするコードを教えていただきました。感謝!
http://qa.atmarkit.co.jp/q/2317
@gongo
gongo / oh-my-project.el
Created July 31, 2012 15:07
現在いるディレクトリが Git Repository 内であれば git ls-files、上位ディレクトリに locate database があれば locate を使ってファイルを検索する elisp
;;; oh-my-project
;;
;; MAHALO License (based on MIT License)
;;
;; Copyright (c) 2012 Wataru MIYAGUNI (gonngo _at_ gmail.com)
;;
;; Permission is hereby granted, free of charge, to any person obtaining a copy
;; of this software and associated documentation files (the "Software"), to deal
;; in the Software without restriction, including without limitation the rights
;; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@gongo
gongo / capybara_rspec_matcher_test.rb
Created July 11, 2012 21:27
RSpec 2.11 からの新しいシンタックスがそのまま Capybara でも使えるかテスト
require 'rubygems'
require 'capybara/rspec'
Capybara.current_driver = :selenium
Capybara.app_host = 'http://www.google.com'
Capybara.run_server = false
include Capybara::DSL
describe "Capybara/RSpec matchers" do