Skip to content

Instantly share code, notes, and snippets.

View akameco's full-sized avatar

akameco akameco

  • Japan, Tokyo
View GitHub Profile
@akameco
akameco / update_name.rb
Created May 13, 2014 07:15
アップデートネーム
# coding: utf-8
require 'rubygems'
require 'twitter'
CONSUMER_KEY = 'APIキー'
CONSUMER_SECRET = 'APIシークレットキー'
ACCESS_TOKEN = 'アクセストークン'
ACCESS_TOKEN_SECRET = 'アクセストークンシークレット'
client = Twitter::REST::Client.new do |config|
# coding: utf-8
require "rubygems"
require "nokogiri"
require "open-uri"
require "kconv"
require "time"
def tenki
time = Time.new
doc = Nokogiri::HTML(open("http://tenki.jp/forecast/point-702.html"))
@akameco
akameco / fackin_hot.rb
Last active December 20, 2015 03:28
ファッキンホット!
# -*- coding: utf-8 -*-
Plugin.create(:fackin_hot) do
on_appear do |ms|
ms.each do |m|
if m.message.to_s =~ /^暑い/
str = "@#{m.user.idname}" + " ファッキンホット"
Service.primary.post(:message => str, :replyto => m)
end
end
@akameco
akameco / nice_rock.rb
Last active December 20, 2015 01:19
ロックスターに即座にナイスロックするプラグイン
# -*- coding: utf-8 -*-
Plugin.create :nice_rock do
on_appear do |ms|
ms.each do |m|
if m.message.to_s =~ /ロックスター/
str ="@#{m.user.idname}" + " ナイスロック"
Service.primary.post(:message => str, :replyto => m)
end
end
end