This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# | |
# Rubyでブロックを引数に受ける方法&ブロックを引数として渡す方法 | |
# | |
class ArrayProxy | |
def initialize | |
@ary = [] | |
end | |
def <<(v) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# | |
# twitter_protected_unfollow.rb | |
# | |
# http://rubydoc.info/gems/twitter/1.0.0/file/README.mkd | |
# | |
require 'rubygems' | |
require 'twitter' | |
require 'pp' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# | |
# ldr2pin.rb - Livedoor ReaderのPinをまとめてpinboard.inにブックマークするスクリプト | |
# | |
$KCODE='utf8' | |
require 'rubygems' | |
require 'net/netrc' | |
require 'mechanize' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// C910CaptureTest.cpp | |
// | |
// Windows上でLogicool C910を使って1920x1080のキャプチャができることを確認。 | |
// videoInput LibraryとOpenCV2.2を組み合わせて実装してます。 | |
// | |
// | |
// OpenCV 2.2 | |
// http://opencv.willowgarage.com/wiki/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
$KCODE='utf8' | |
require 'base64' | |
require 'webrick' | |
include WEBrick | |
include WEBrick::HTTPServlet | |
# default configuration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// how_to_abort_reading_from_stdin.cpp | |
// | |
// Windowsでコンソールからの1行読み込みを途中で中断するサンプル | |
// | |
// メモ: | |
// * ReadConsole()を使うと入力されるまで制御が帰ってこなくなるので、 | |
// 低レベルAPIのReadConsoleInput()を使用している。 | |
// * GetStdHandle(STD_INPUT_HANDLE)で取れるハンドルに対して | |
// WaitForSingleObject()するとReadConsoleInput()のイベントを待つことになる。 |