Skip to content

Instantly share code, notes, and snippets.

@penguin2716
penguin2716 / mikutter_anonymous.rb
Last active December 15, 2015 01:39
すべてのツイートを匿名にするmikutterプラグイン
# -*- coding: utf-8 -*-
Plugin.create :anonymous do
UserConfig[:anonymous_all_tweets] ||= false
filter_show_filter do |msgs|
if UserConfig[:anonymous_all_tweets]
msgs.map!{|m| Message.new(:message => m[:message], :system => true) }
end
[msgs]
@penguin2716
penguin2716 / mikutter_show_mcdonalds_coupon.rb
Last active December 15, 2015 00:39
マクドナルドのクーポンを表示するmikutterプラグイン
#-*- coding: utf-8 -*-
Plugin.create :show_mcdonalds_coupon do
command(:show_mcdonalds_coupon,
name: 'マクドナルドのクーポンを表示',
condition: lambda{ |opt| true },
icon: 'http://www.mcdonalds.co.jp/common/graphic_files/global_navigation/image_01.gif',
visible: true,
role: :window) do |opt|
@penguin2716
penguin2716 / mikutter_tategaki.rb
Last active December 14, 2015 23:48
mikutter用縦書きプラグイン
# -*- coding: utf-8 -*-
Plugin.create :tategaki do
def to_tategaki(str)
result = ""
halfs = ('0'..'9').to_a + ('A'..'Z').to_a + ('a'..'z').to_a
fulls = ('0'..'9').to_a + ('A'..'Z').to_a + ('a'..'z').to_a
half_symbols = ' !""#$%&''\'''\'()*+,-./:;<=>?@[\\]^_`{|}~'.split('')
@penguin2716
penguin2716 / post_as_mikutter_command.rb
Last active December 14, 2015 23:19
Postboxに入力した内容をmikutterコマンドとして実行するmikutterプラグイン
# -*- coding: utf-8 -*-
Plugin.create :post_as_mikutter_command do
command(:post_as_mikutter_command,
name: 'mikutterコマンドとして実行',
condition: lambda{ |opt| Plugin.create(:gtk).widgetof(opt.widget).widget_post.buffer.text.size > 0 },
visible: true,
role: :postbox) do |opt|
begin
@penguin2716
penguin2716 / mikutter_credit.rb
Created March 12, 2013 14:52
単位認定するmikutterプラグイン
#-*- coding: utf-8 -*-
Plugin.create :credit do
command(:credit,
name: '単位認定',
condition: lambda{ |opt| true },
visible: true,
role: :timeline) do |opt|
opt.messages.each { |m|
@penguin2716
penguin2716 / degree_certificate.rb
Created March 11, 2013 02:44
卒業証明書を発行するmikutterプラグイン
#-*- coding: utf-8 -*-
Plugin.create :degree_certificate do
command(:degree_certificate,
name: '卒業証明書を発行',
condition: lambda{ |opt| true },
visible: true,
role: :timeline) do |opt|
opt.messages.each { |m|
@penguin2716
penguin2716 / aieeeee.rb
Created March 6, 2013 17:07
どんなツイートも「アイエエエエエ!」になっちゃうmikutterプラグイン
#-*- coding: utf-8 -*-
Plugin.create :aieeeee do
filter_gui_postbox_post do |gui_postbox|
Plugin.create(:gtk).widgetof(gui_postbox).widget_post.buffer.text = "アイエエエエエ!#{' ' * rand(30)}"
[gui_postbox]
end
end
@penguin2716
penguin2716 / too_late.rb
Created March 3, 2013 05:37
favstarに対応
#-*- coding: utf-8 -*-
Plugin.create(:too_late) do
command(:too_late,
name: 'Too late',
condition: lambda{ |opt| true },
visible: true,
role: :timeline) do |opt|
opt.messages.each { |m|
Service.primary.post(:message => "@#{m.user.idname} Too late.", :replyto => m)
@penguin2716
penguin2716 / tomossan-fav.rb
Created February 28, 2013 13:00
ともっさんに誠意を見せるmikutterプラグイン
Plugin.create :fav_tomossan do
on_appear do |ms|
ms.each do |m|
if m.user.to_s == "tomossan"
m.favorite
end
end
end
end
@penguin2716
penguin2716 / mikutter.rb.patch
Created February 8, 2013 17:25
gemでインストールしたやつを優先的にrequireするのです!
--- mikutter.rb.orig 2013-02-09 02:24:16.296910542 +0900
+++ mikutter.rb 2013-02-09 02:19:53.325923513 +0900
@@ -12,6 +12,10 @@
=end
+`find ~/.gem -type d -name 'lib' | sort`.split("\n").each do |dir|
+ $:.unshift dir
+end
+