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
# -*- coding: utf-8 -*- | |
# superdry tweet / earthquake plugin | |
# | |
# superdry: http://shindanmaker.com/43570 | |
# | |
require 'net/http' | |
require 'nokogiri' | |
Earthquake.init do | |
command :byunasahi do |
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
# -*- coding: utf-8 -*- | |
require 'utf8-cleaner' | |
Earthquake.init do | |
output_filter do |item| | |
next if item.nil? || item["text"].nil? | |
str = UTF8Cleaner::URIString.new(item["text"]).cleaned | |
!(/^.+[¥"QR]T(?:[:\s]*@[A-Za-z0-9_]|\(via[:\s]*@[A-Za-z0-9_]).+[¥"QR]T/ =~ str) | |
end | |
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
# -*- coding: utf-8 -*- | |
# favstar / earthquakge.gem plugin | |
# | |
# e.g. :favstar #=> your favstar | |
# :favstar who #=> who's favstar | |
# | |
require 'open-uri' | |
require 'nokogiri' | |
Earthquake.init do |
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
# -*- coding: utf-8 -*- | |
# takagi RT | |
# | |
# e.g. :takagi $xx | |
# | |
Earthquake.init do | |
command %r|^:takagi\s+(\d+)$|, :as => :takagi do |m| | |
st = cache.read("status:" + m[1]) | |
text = sprintf("だったら黙ってろクソが RT @%s %s" % [st["user"]["screen_name"], st["text"]]) | |
async_e { twitter.update(text, :in_reply_to_status_id => m[1]) } if confirm("update '#{text}'") |
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 follow organization | |
// @description Show follow button on github organization page | |
// @namespace http://www.portalshit.net/ | |
// @include https://github.com/* | |
// @version 0.1 | |
// @license MIT License | |
// @work Google Chrome | |
// ==/UserScript== |
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
# coding: UTF-8 | |
Earthquake.init do | |
once do | |
user = twitter.info['screen_name'] | |
config[:prompt] = user.c(color_of(user)) + config[:prompt] | |
end | |
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
#!/usr/bin/env ruby | |
require 'fileutils' | |
require 'digest/md5' | |
def main | |
user = IO.popen("whoami", "r+").gets.chomp | |
file = "/Users/#{user}/Dropbox/Public/gyazo/#{Digest::MD5.hexdigest(Time.now.to_f.to_s)}.png" | |
url = 'https://dl.dropboxusercontent.com/u/2611378/gyazo/' + File.basename(file) |
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
p() { | |
local pid exit | |
# http://www.filesonic.com/file/703099021 | |
afplay ~/Music/Nyan\ Cat.mp3 & | |
pid=$! | |
trap "kill -9 $pid" INT | |
command $* | |
exit=$? | |
kill -9 $pid | |
trap INT |
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
# -*- coding: utf-8 -*- | |
# ogyohee tweet / earthquake plugin | |
# | |
# ogyohee: http://shindanmaker.com/152454 | |
# | |
require 'net/http' | |
Earthquake.init do | |
command %r|^:ogyo\s*(.+)*|, :as => :ogyohee do |m| | |
url = "http://shindanmaker.com/152454" |
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
# -*- coding: utf-8 -*- | |
# favstar / earthquakge.gem plugin | |
# | |
# e.g. :favstar #=> your favstar | |
# :favstar who #=> who's favstar | |
# | |
require 'rss' | |
Earthquake.init do |
NewerOlder