Skip to content

Instantly share code, notes, and snippets.

@penguin2716
penguin2716 / mikutter_haishou.rb
Created Feb 10, 2014
「はい」を全て「拝承」に書き換えてからツイートするmikutterプラグイン
View mikutter_haishou.rb
# -*- 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!
@penguin2716
penguin2716 / asetroot.sh
Created Feb 9, 2014
update wallpaper after scaling and cropping the image to the current screen resolution
View asetroot.sh
#!/bin/bash
#
# asetroot.sh
#
# Copyright (c) 2014 Takuma Nakajima
#
# This software is released under the MIT License.
# http://opensource.org/licenses/mit-license.php
#
@penguin2716
penguin2716 / scale_resolution.rb
Created Feb 9, 2014
update screen resolution by setting scale ratio automatically
View scale_resolution.rb
#!/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
@penguin2716
penguin2716 / mikutter_download_all_media.rb
Created Feb 5, 2014
流れてきたツイートに含まれる画像とかを全部保存するmikutterプラグイン
View mikutter_download_all_media.rb
# -*- 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
@penguin2716
penguin2716 / reset_tweet_bgcolor.mdc
Created Feb 4, 2014
mikutterのツイート背景色とかをリセットするmikutter_dbus_consoleスクリプト
View reset_tweet_bgcolor.mdc
#!/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]
@penguin2716
penguin2716 / mikutter_dbus_console.rb
Last active Oct 19, 2015
mikutter dbus console
View mikutter_dbus_console.rb
#!/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
@penguin2716
penguin2716 / mkgentoousb.sh
Created Jan 30, 2014
An easy script to create Gentoo/Linux installation usb stick.
View mkgentoousb.sh
#!/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"
@penguin2716
penguin2716 / auto_wget_img.rb
Last active Jan 4, 2016
まとめサイトとかから自動で画像をwgetしてくれるRubyスクリプト
View auto_wget_img.rb
#!/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
@penguin2716
penguin2716 / vimlike_textview.rb
Created Jan 1, 2014
vimlike_textview for mikutter (development preview)
View vimlike_textview.rb
#!/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
@penguin2716
penguin2716 / colorize_postbox_basecolor.rb
Created Dec 31, 2013
フォーカスの有無によって投稿ボックスの背景色を変更するmikutterプラグイン
View colorize_postbox_basecolor.rb
#-*- 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