Skip to content

Instantly share code, notes, and snippets.

@shibafu528
shibafu528 / ebi_beam.rb
Last active August 29, 2015 13:57 — forked from firstspring1845/java_beam.rb
千葉県に謝罪の意を込めて
# -*- coding: utf-8 -*-
Plugin.create :ebi_beam do
command(:ebi_beam,
name: 'エビビーム',
condition: lambda{ |opt| true},
visible: false,
role: :window) do |opt|
Service.primary.post(:message => 'エビビームビビビビビビビwwwwwwwwww')
end
end
@shibafu528
shibafu528 / mikutter_bosskita.rb
Created May 3, 2014 16:58
こうですかわかりません
# -*- coding: utf-8 -*-
Plugin.create(:bosskita) do
command(:bosskita,
name: 'ボス来た',
condition: lambda{ |opt| true},
visible: false,
role: :window) do |opt|
exit(0)
end
@shibafu528
shibafu528 / protected_marimo.rb
Last active August 29, 2015 14:01
まりもみたいなやつを鍵垢の証として転用する #mikutter
# -*- coding: utf-8 -*-
# まりもを鍵垢に対して常に表示する感じにオーバーライド
class Gdk::MiraclePainter < Gtk::Object
def iob_icon_pixbuf_off
[ [(UserConfig[:show_replied_icon] and message.mentioned_by_me? and "reply.png"),
message.user[:protected] ? "etc.png" : nil],
[message.retweeted? ? "retweet.png" : nil,
message.favorite? ? "unfav.png" : nil]
]
@shibafu528
shibafu528 / gstfix.rb
Created May 23, 2014 10:28
Ruby/Gstを試してみよう
# -*- coding: utf-8 -*-
require "gst"
=begin
Ruby/GStreamer 2.2.0 を ruby 2.1.0 上で使用する際に、
Gst.init で例外がスローされ使用することができなくなる不具合を修正します
パッチはすでにGithub上でマージされていますので、
次期バージョン以降はこのモンキーパッチを使用する必要は無くなると期待されます
パッチ引用元:
@shibafu528
shibafu528 / stap.sh
Created June 11, 2014 22:14
やっつけなコピペ
#/bin/bash
count=0
gen=AAAA
while [ "$gen" != "STAP" ]
do
count=$(($count+1))
gen=`cat /dev/urandom | tr -dc 'A-Z' | fold -w 4 | head -n 1`
echo ${gen}細胞
done
echo ${count}回目で陽性かくにん!よかった
@shibafu528
shibafu528 / y4a_link_accel.md
Created July 14, 2014 14:43
Yukari for Android, Link Accelerator について
@shibafu528
shibafu528 / play_mikutter_drumnbass.rb
Last active August 29, 2015 14:05
mikutterでSoundcloudから音楽を再生するサンプル。mikutter_gstreamer( https://github.com/shibafu528/mikutter_gstreamer )と soundcloud gem をご用意ください。
# -*- coding: utf-8 -*-
# Dependencies
# - mikutter_gstreamer
require 'soundcloud'
CLIENT_ID = 'ac11c1fa19b6bc56a48edde5e40cbc18'
Plugin.create :play_mikutter_drumnbass do
command(:play_mikutter_drumnbass,
name: 'みくったーちゃんがドラムンベースをうたってくれたよ',
@shibafu528
shibafu528 / mikutter_recotw.rb
Last active August 29, 2015 14:05
recotw.tk に黒歴史を投げつけよう
# -*- coding: utf-8 -*-
require 'net/http'
Plugin.create(:mikutter_recotw) do
command(:post_recotw,
name: 'recotwに登録',
condition: Plugin::Command::CanReplyAll,
visible: true,
icon: nil,
role: :timeline) do |opt|
@shibafu528
shibafu528 / mikutter_patch_charcount.rb
Last active August 29, 2015 14:05
twitter-text gem を利用して、mikutter PostBoxの文字数カウントをt.coを考慮したものに変更します。なおcoreの短縮システムとの兼ね合いはとっていません。
# -*- coding: utf-8 -*-
require 'twitter-text'
class Gtk::PostBox
# この値は変更される場合があるため、API help/configuration 'short_url_length' から取得するべき
TCO_LENGTH = 22
def remain_charcount
if not widget_post.destroyed?
footer = if add_footer? then UserConfig[:footer].size else 0 end
@shibafu528
shibafu528 / nijiru.rb
Last active August 29, 2015 14:05
forked from toshia/mikutter-kancolle https://github.com/toshia/mikutter-kancolle
# -*- coding: utf-8 -*-
require "webkit-gtk2"
Plugin.create(:nijiru) do
tab(:nijiru, "鳥") do
view = WebKitGtk2::WebView.new
view.load_uri("http://detteiu.net/nijiru/")
nativewidget view.show_all
end
end