Skip to content

Instantly share code, notes, and snippets.

View naoto's full-sized avatar

Naoto SHINGAKI naoto

View GitHub Profile
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/
bot: 楽天市場 - 【楽天市場】注文内容ご確認(自動配信メール) http://gmail.com/xxxx
bot: Qiita[キータ] - 「オブジェクト指向プログラミング」と「関数型プログラミング」のたった一つのシンプルな違い http://gmail.com/xxxx
@naoto
naoto / cc
Last active August 29, 2015 14:16
#!/bin/sh
mplayer -fs $(cinemastar-client latest | peco)
@naoto
naoto / gist:204026
Created October 7, 2009 13:40
saymove downloader
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/
@naoto
naoto / irc2mail.rb
Created October 16, 2009 12:21
tiarraのLogをgmail経由で転送
#!/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"
@naoto
naoto / turn_a_word.rb
Created October 26, 2009 09:00
ターンエーのセリフ抽出
#!/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))
@naoto
naoto / mixi_voice_bot.rb
Created October 28, 2009 12:20 — forked from tomohiro/mixi_voice_bot.rb
mixi voice irc gateway
#!/usr/bin/env ruby
$LOAD_PATH << 'lib'
$LOAD_PATH << '../lib'
require 'optparse'
require 'rubygems'
require 'net/irc'
require 'uri'
require 'mechanize'
@naoto
naoto / twitter_search.rb
Created November 2, 2009 13:30
Citrus Plugin - Twitter Search -
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|
@naoto
naoto / Twitter.rb
Created November 27, 2009 00:57
Citrus Plugin - Twitter twit -
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}"))
@naoto
naoto / flickr_uploader.rb
Created January 20, 2010 07:36
Flickr Uploader
#!/usr/bin/env ruby
require 'rubygems'
require 'flickr'
require 'fileutils'
api_key = ""
secret = ""
flickr = Flickr.new('flickr.dat',api_key, secret)