Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/ruby
#
# Rubyでブロックを引数に受ける方法&ブロックを引数として渡す方法
#
class ArrayProxy
def initialize
@ary = []
end
def <<(v)
//
// Apple Remote IR Protocol test.pde
//
// Please install IRemote library.
// http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
//
// This sketch uses the PL-IRM0101.
// http://akizukidenshi.com/catalog/g/gI-00622/
//
#include <IRremote.h>
//
// Apple_Remote_Keyboard_Emulator.pde
// (prototype, not tested...)
//
// UsbKeyboard
// http://code.google.com/p/vusb-for-arduino/downloads/list
// http://www.practicalarduino.com/projects/easy/virtual-usb-keyboard
//
// IRremote.h
// http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html
/*
* WebViewTest.java
* see also: http://developer.android.com/reference/android/webkit/WebView.html
*/
package net.sabamiso.android.WebViewTest;
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
/*
* WebViewTest.java
* see also: http://developer.android.com/reference/android/webkit/WebView.html
*/
package net.sabamiso.android.WebViewTest;
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
#!/usr/bin/ruby
#
# twitter_protected_unfollow.rb
#
# http://rubydoc.info/gems/twitter/1.0.0/file/README.mkd
#
require 'rubygems'
require 'twitter'
require 'pp'
@yoggy
yoggy / ldr2pin.rb
Created January 12, 2011 06:19
Livedoor ReaderのPinをまとめてpinboard.inにブックマークするスクリプト
#!/usr/bin/ruby
#
# ldr2pin.rb - Livedoor ReaderのPinをまとめてpinboard.inにブックマークするスクリプト
#
$KCODE='utf8'
require 'rubygems'
require 'net/netrc'
require 'mechanize'
@yoggy
yoggy / C910CaptureTest.cpp
Created January 20, 2011 11:43
videoInputLibraryとOpenCVを組み合わせてLogicool C910で1920x1080のキャプチャをしてみるテスト(Windows)
//
// C910CaptureTest.cpp
//
// Windows上でLogicool C910を使って1920x1080のキャプチャができることを確認。
// videoInput LibraryとOpenCV2.2を組み合わせて実装してます。
//
//
// OpenCV 2.2
// http://opencv.willowgarage.com/wiki/
#!/usr/bin/ruby
$KCODE='utf8'
require 'base64'
require 'webrick'
include WEBrick
include WEBrick::HTTPServlet
# default configuration
@yoggy
yoggy / how_to_abort_reading_from_stdin.cpp
Created February 3, 2011 08:49
Windowsでコンソールからの1行読み込みを途中で中断するサンプル
//
// how_to_abort_reading_from_stdin.cpp
//
// Windowsでコンソールからの1行読み込みを途中で中断するサンプル
//
// メモ:
// * ReadConsole()を使うと入力されるまで制御が帰ってこなくなるので、
// 低レベルAPIのReadConsoleInput()を使用している。
// * GetStdHandle(STD_INPUT_HANDLE)で取れるハンドルに対して
// WaitForSingleObject()するとReadConsoleInput()のイベントを待つことになる。