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
naoto: ラーメン探して来て | |
bot: ラーメン - Wikipedia - http://ja.wikipedia.org/wiki/%E3%83%A9%E3%83%BC%E3%83%A1%E3%83%B3 | |
bot: ラーメンデータベース - レビューとクチコミで探す。全国ラーメンデータベース - http://ramendb.supleks.jp/ | |
bot: 新横浜ラーメン博物館 - http://www.raumen.co.jp/ |
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
bot: 楽天市場 - 【楽天市場】注文内容ご確認(自動配信メール) http://gmail.com/xxxx | |
bot: Qiita[キータ] - 「オブジェクト指向プログラミング」と「関数型プログラミング」のたった一つのシンプルな違い http://gmail.com/xxxx |
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
#!/bin/sh | |
mplayer -fs $(cinemastar-client latest | peco) |
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 'hpricot' | |
require 'open-uri' | |
def getSearch(search_uri) | |
html = Hpricot(open(search_uri)) | |
html.search("a").each { |a| | |
if a.inner_text != "" && a.attributes['href'] =~ /comeplay\.php/ |
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/env ruby | |
require 'sendgmail.rb' | |
require 'yaml' | |
@log_dir = "/path/to/log" | |
@channels = %w{#xxxxx@freenode #xxxxx@twitter} | |
@file_name = Time.now.strftime("%Y.%m.%d.txt") | |
@keywords = "key1|key2|key3" | |
@send_mail_address = "xxxxxx@gmail.com" |
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/local/bin/ruby | |
require 'rubygems' | |
require 'hpricot' | |
require 'open-uri' | |
require 'uri' | |
require 'kconv' | |
def getWord(page) | |
html = Hpricot(open(URI.parse(@uri) + page)) |
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/env ruby | |
$LOAD_PATH << 'lib' | |
$LOAD_PATH << '../lib' | |
require 'optparse' | |
require 'rubygems' | |
require 'net/irc' | |
require 'uri' | |
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
require 'nokogiri' | |
require 'open-uri' | |
class TwitterSearch < Citrus::Plugin | |
def on_privmsg(prefix, channel, message) | |
if message =~ /(#{@config["words"]})/ && | |
(!@config["channels"] || @config["channels"].include?(channel)) | |
words = $1 if message =~ /^tws\s(.+)$/ | |
search(words.split(/\s/)).each { |result| |
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 'open-uri' | |
require 'hpricot' | |
class Twitter < Citrus::Plugin | |
def on_privmsg(prefix, channel, message) | |
if /#{@config["prefix"]}/ =~ message | |
user = $2 | |
html = Hpricot(open("http://twitter.com/#{user}")) |
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/env ruby | |
require 'rubygems' | |
require 'flickr' | |
require 'fileutils' | |
api_key = "" | |
secret = "" | |
flickr = Flickr.new('flickr.dat',api_key, secret) |
OlderNewer