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 :shrink_words do | |
def shrink_words(src) | |
str = src | |
src.scan(/[a-zA-Z_]+/).map{ |s| | |
if s.size > 3 | |
[s, s[0] + (s.size - 2).to_s + s[-1]] | |
else | |
[s, s] |
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 :haishou do | |
filter_gui_postbox_post do |gui_postbox| | |
text = Plugin.create(:gtk).widgetof(gui_postbox).widget_post.buffer.text.gsub(/はい/, "拝承") | |
Service.primary.post :message => text | |
Plugin.call(:before_postbox_post, text) | |
Plugin.create(:gtk).widgetof(gui_postbox).widget_post.buffer.text = '' | |
Plugin.filter_cancel! |
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 | |
# | |
# asetroot.sh | |
# | |
# 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 | |
=begin | |
Copyright (c) 2014 Takuma Nakajima | |
This software is released under the MIT License. | |
http://opensource.org/licenses/mit-license.php | |
=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 -*- | |
=begin | |
mikutter_download_all_media | |
Copyright (c) 2014 Takuma Nakajima | |
This software is released under the MIT License. | |
http://opensource.org/licenses/mit-license.php | |
=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
#!/home/penguin/mikutter_dbus_console.rb | |
UserConfig[:mumble_basic_font] = 'Sans 10' | |
UserConfig[:mumble_basic_color] = [0, 0, 0] | |
UserConfig[:mumble_reply_font] = 'Sans 8' | |
UserConfig[:mumble_reply_color] = [255*0x66, 255*0x66, 255*0x66] | |
UserConfig[:mumble_basic_left_font] = 'Sans 10' | |
UserConfig[:mumble_basic_left_color] = [0, 0, 0] | |
UserConfig[:mumble_basic_right_font] = 'Sans 10' | |
UserConfig[:mumble_basic_right_color] = [255*0x99, 255*0x99, 255*0x99] |
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 | |
mikutter dbus console | |
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
#!/bin/sh | |
set -e | |
echo "This is an easy script to create Gentoo/Linux installation usb stick." | |
echo | |
if [ $# -ne 2 ] | |
then | |
echo "usage: $0 /dev/sdx /path/to/gentoo_install_disk.iso" |
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 |