Skip to content

Instantly share code, notes, and snippets.

View cosmo0920's full-sized avatar
🏠
Working from home

Hiroshi Hatake cosmo0920

🏠
Working from home
View GitHub Profile
def tag_user_id_link(body)
tag = body.buffer.create_tag('_user_id_link',
'foreground' => 'blue',
"underline" => Pango::UNDERLINE_SINGLE)
tag.signal_connect('event'){ |this, textview, event, iter|
result = false
if(event.is_a?(Gdk::EventButton)) and
(event.event_type == Gdk::Event::BUTTON_RELEASE) and
not(textview.buffer.selection_bounds[2])
if (event.button == 1)
* IMPORTANT: 1 news items need reading for repository 'gentoo_prefix'.
* Use eselect news to read news items.
These are the packages that would be merged, in reverse order:
Calculating dependencies ... done!
scanelfを入れるために
$emerge app-misc/pax-utils
すると以下のエラー:
 * Package: app-misc/pax-utils-0.2.1
 * Repository: gentoo_prefix
 * Maintainer: solar@gentoo.org vapier@gentoo.org
 * USE: elibc_glibc kernel_linux prefix userland_GNU x86
 * FEATURES: preserve-libs
>>> Unpacking source...
>>> Unpacking pax-utils-0.2.1.tar.bz2 to /home/cosmo/Gentoo/var/tmp/portage/app-misc/pax-utils-0.2.1/work
@cosmo0920
cosmo0920 / ruby193_to_mikutter.patch
Created November 3, 2011 22:48
11/4日時点でmikutterの環境をrb193へ上げるパッチ。応急処置です。
--- build.sh 2011-10-26 18:55:09.000000000 +0900
+++ build_.sh 2011-11-04 07:47:41.410828740 +0900
@@ -4,7 +4,7 @@
# mikutter environment builder for developer (debian & ubuntu)
#**************************************************************
-RUBY_SERVER='http://ftp.ruby-lang.org/pub/ruby'
+RUBY_SERVER='http://ftp.ruby-lang.org/pub/ruby/1.9'
INSTALL_DIR='/opt/miku'
SRC_DIR="${INSTALL_DIR}/src"
@cosmo0920
cosmo0920 / gist:1379063
Created November 19, 2011 17:14
emerge perl-5.12.3-r1
emerge --info =dev-lang/perl-5.12.3-r1
Portage 2.2.01.19572-prefix (prefix/linux/x86, gcc-4.4.5, unavailable, 2.6.41-custom-fornewercore2 i686)
=================================================================
System Settings
=================================================================
System uname: Linux-2.6.41-custom-fornewercore2-i686-Intel-R-_Core-TM-_i3_CPU_560_@_3.33GHz-with-debian-squeeze-sid
Timestamp of tree: Sat, 19 Nov 2011 16:10:28 +0000
app-shells/bash: 4.2_p10
sys-devel/binutils: 2.21.53.0.2
sys-devel/gcc-config: 1.4.1-r00.2
@cosmo0920
cosmo0920 / gist:1379143
Created November 19, 2011 18:07
ls /usr/lib/libm*
ls /usr/lib/libm*
/usr/lib/libm17n-core.so.0
/usr/lib/libm17n-core.so.0.4.0
/usr/lib/libm17n-flt.so.0
/usr/lib/libm17n-flt.so.0.4.0
/usr/lib/libm17n-gui.so.0
/usr/lib/libm17n-gui.so.0.4.0
/usr/lib/libm17n.so.0
/usr/lib/libm17n.so.0.4.0
/usr/lib/libmad.a
@cosmo0920
cosmo0920 / gist:1393708
Created November 25, 2011 14:55
emerge perl failed
 * Package: dev-lang/perl-5.12.3-r1
 * Repository: gentoo_prefix
 * USE: elibc_glibc kernel_linux prefix userland_GNU x86
 * FEATURES: preserve-libs
>>> Unpacking source...
>>> Unpacking perl-5.12.3.tar.bz2 to /home/cosmo/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/work
>>> Unpacking perl-5.12.3-4.tar.bz2 to /home/cosmo/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/work
>>> Source unpacked in /home/cosmo/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/work
>>> Preparing source in /home/cosmo/gentoo/var/tmp/portage/dev-lang/perl-5.12.3-r1/work/perl-5.12.3 ...
* Applying various patches (bugfixes/updates) ...
@cosmo0920
cosmo0920 / 00basic modified
Created November 26, 2011 14:40
USE=-fortran emerge --oneshot --nodeps "=sys-devel/gcc-4.2*"
# /home/cosmo/gentoo/etc/env.d/00basic
# Do not edit this file
# in prefix we have sbin variants in user path!
PATH="/home/cosmo/gentoo/opt/bin:/home/cosmo/gentoo/usr/sbin:/home/cosmo/gentoo/sbin"
ROOTPATH="/home/cosmo/gentoo/opt/bin"
LDPATH="/home/cosmo/gentoo/usr/local/lib:/lib/i386-linux-gnu"
MANPATH="/home/cosmo/gentoo/usr/share/man"
INFOPATH="/home/cosmo/gentoo/usr/share/info"
CVS_RSH="ssh"
@cosmo0920
cosmo0920 / test_client_filter.rb
Created January 22, 2012 14:34
自動ツイート撃退!
# -*- coding: utf-8 -*-
Plugin.create(:myfilter) do
exclude_client = ["twittbot.net"]
filter_show_filter do |msgs|
msgs = msgs.select{ |m| not exclude_client.any?{ |word| m.to_s.include?(m[:source]) } }
[msgs]
end
end
@cosmo0920
cosmo0920 / joysdl.rb
Created January 24, 2012 09:36
mikutterでゲームパッドのやり方わからぬぇ
# -*- coding: utf-8 -*-
# SDLでゲームパッド!!
require 'sdl'
Module.new do
SDL.init(SDL::INIT_JOYSTICK)
SDL::Joystick.num.times do |i|
p SDL::Joystick.index_name(i) #joystickの認識に失敗するとmikutterがピャアアアアアアア
end