Skip to content

Instantly share code, notes, and snippets.

@shigaku
shigaku / minimum-cassandra-ruby-by-thrift
Created July 10, 2010 14:46
Using Cassandra on Mac OS X with Ruby
#!/usr/bin/ruby
$KCODE='u'
require 'cassandra'
transport = Thrift::BufferedTransport.new(Thrift::Socket.new("127.0.0.1","9160"))
transport.open
client = CassandraThrift::Cassandra::Client.new(Thrift::BinaryProtocol.new(transport))
@shigaku
shigaku / Simple way to eliminate tags
Created May 27, 2010 04:00
タグ除去の方法
echo "<p>hogehoe&nbsp;hoeghoge</p>" | w3m -T text/html -dump
@shigaku
shigaku / A.P. Shield Demo Program for Arduino 0018
Created May 26, 2010 01:36
Arduino用心拍センサーシールドのデモプログラムです。詳細はこちら: http://koress.jp/2010/05/arduinoap_shield.html
/*
A.P. Shield 05 Demo Program
Created by @shigaku / KORESS
http://koress.jp/
http://twitter.com/shigaku
*/
int sensorPin = 4;
int ledPin = 13;
int sensorValue = 0;