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
# For library test | |
if __FILE__ == $0 then | |
end |
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
/opt/local/bin/ruby -I"lib:test" "/opt/local/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/unit/hoge_test.rb" |
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
emulator @moongift -sdcard ~/.android/sdcard |
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
# 1) Point *.example.com in your DNS setup to your server. | |
# | |
# 2) Setup an Apache vhost to catch the star pointer: | |
# | |
# <VirtualHost *:80> | |
# ServerName example.com | |
# ServerAlias *.example.com | |
# </VirtualHost> | |
# | |
# 3) Set the current account from the subdomain |
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
// ==UserScript== | |
// @name Google Reader Star Opener | |
// @namespace http://www.sukechan.net/ | |
// @description Starred item open in a lump for Google Reader. | |
// @include http://www.google.co.jp/reader/view/* | |
// @include http://www.google.com/reader/view/* | |
// @version 1.0.1 | |
// ==/UserScript== | |
(function() { |
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
def wpautop(pee, br = true) | |
return '' if pee.strip == '' | |
pee = "#{pee}\n" # just to make things a little easier, pad the end | |
pee = pee.gsub(/<br \/>\s*<br \/>/s, "\n\n") | |
# pace things out a little | |
allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)'; | |
pee = pee.gsub(Regexp.new('(<'+allblocks+'[^>]*>)'), "\n"+'\1') | |
pee = pee.gsub(Regexp.new('(<\/'+allblocks+'[^>]*>)'), '\1' + "\n\n") | |
pee = pee.gsub(/\r\n|\r/, "\n") # cross-platform newlines | |
if pee.include?('<object') |
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
require 'rubygems' | |
require 'basecamp' | |
require 'Skype' | |
require 'active_support' | |
project_id = null | |
Basecamp.establish_connection!('subdomain.basecamphq.com', 'your id', 'your password', true) | |
Skype.init 'some application name' | |
Skype.start_messageloop |
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
require 'rubygems' | |
require 'tinder' | |
campfire = Tinder::Campfire.new 'your subdomain', :token => 'your api key' | |
require 'meow' | |
meep = Meow.new('Meow Test') | |
room = campfire.find_room_by_name('your room name') | |
room.listen do |m| | |
meep.notify('From Campfire', "#{m["user"]["name"]} says #{m["body"]}") | |
end |
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
require 'rubygems' | |
require 'Skype' | |
Skype.init 'some application name' | |
Skype.start_messageloop | |
Skype::ChatMessage.set_notify do |chatmessage, property, value| | |
if chatmessage.get_chat.getTopic == "hogehoge" && value == 'RECEIVED' && property == :status | |
chatmessage.get_chat.send_message "Hei, someone said, #{chatmessage.get_body}!" | |
end | |
end |
OlderNewer