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
#!/bin/bash | |
if [ "x$1" = "x" -o "x$2" = "x" ]; then | |
echo Usage: `basename "$0"` "<input.pdf>" "<output.pdf>" >&2 | |
exit 1 | |
fi | |
# change 'ps2write' to 'pswrite' if errors | |
gs -sDEVICE=ps2write -dNOCACHE -sOutputFile=- -q -dbatch \ | |
-dNOPAUSE -dQUIET "$1" -c quit | ps2pdf - "$2" |
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 | |
Plugin.create :masquerade_curry_ukiuki do | |
Thread.new { | |
loop do | |
Plugin.call(:update, nil, [Message.new(:message => "マスカレード・カレー・ウキウキ", :system => true)]) | |
sleep 120 | |
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 -*- | |
Plugin.create :jins_pc do | |
filter_message_background_color do | mp, color | | |
# 青成分を50%カット | |
[mp, [color[0],color[1],(color[2] * 0.5).to_i]] | |
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 | |
#-*- coding: utf-8 -*- | |
require 'net/http' | |
require 'uri' | |
require 'json' | |
require 'pp' | |
require 'optparse' | |
PRINT_CREDENTIALS = false |
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 | |
#-*- coding: utf-8 -*- | |
=begin | |
Auto wget image | |
Copyright (c) 2014 Takuma Nakajima | |
This software is released under the MIT License. | |
http://opensource.org/licenses/mit-license.php |
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 | |
#-*- coding: utf-8 -*- | |
require 'gtk2' | |
require 'gtksourceview2' | |
class VimlikeTextView < Gtk::SourceView | |
attr_accessor :current_mode, :default_bgcolor, :insert_bgcolor, :visual_bgcolor, :select |
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 'gtk2' | |
Plugin.create :colorize_textview_base do | |
UserConfig[:normal_basecolor] ||= [0xffff, 0xffff, 0xffff] | |
UserConfig[:focused_basecolor] ||= [0xffff, 0xffff, 0xbbbb] | |
settings "投稿ボックスの背景色" do | |
settings "色の設定" 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 -*- | |
Plugin.create :mikutter_shout do | |
@candidates = "あうえおぁぅぇぉw!".split("") | |
command(:shout, | |
name: '叫ぶ', | |
condition: lambda{ |opt| true }, | |
visible: true, | |
role: :postbox) do |opt| |
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
#!/bin/bash | |
if [ $USER != "root" ]; then | |
echo "root permission required" | |
exit 1 | |
fi | |
if [ $# -eq 0 ]; then | |
echo "usage: $0 <fqdn> [<hosts_file>]" | |
exit 1 |