Skip to content

Instantly share code, notes, and snippets.

View rhenium's full-sized avatar
🥐

Kazuki Yamaguchi rhenium

🥐
View GitHub Profile
@rhenium
rhenium / gist:8767927
Last active August 29, 2015 13:55
だれかいい方法おしえて
class Sample
def hello
puts "hello"
end
def hello2
puts "hello2"
end
end
/var/webapps/aclog/lib/aclog/receiver/collector_connection.rb:38: [BUG] Segmentation fault
ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-solaris2.11]
-- Control frame information -----------------------------------------------
c:0020 p:---- s:0083 e:000082 CFUNC :feed_each
c:0019 p:0011 s:0079 e:000078 METHOD /var/webapps/aclog/lib/aclog/receiver/collector_connection.rb:38 [FINISH]
c:0018 p:---- s:0075 e:000074 CFUNC :run_machine
c:0017 p:0267 s:0072 e:000071 METHOD /opt/local/lib/ruby/gems/2.0.0/gems/eventmachine-1.0.3/lib/eventmachine.rb:187
c:0016 p:0084 s:0065 E:002458 METHOD /var/webapps/aclog/lib/aclog/receiver/worker.rb:29
c:0015 p:0174 s:0060 E:000598 BLOCK /opt/local/lib/ruby/gems/2.0.0/gems/daemon-spawn-0.4.2/lib/daemon_spawn.rb:51 [FINISH]
./start.rb: [BUG] Segmentation fault at 0x007fbb86dabce8
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0002 E:000338 TOP [FINISH]
-- C level backtrace information -------------------------------------------
ruby(+0x1871dc) [0x7fbb8458a1dc]
ruby(+0x1f9cb3) [0x7fbb845fccb3]
@rhenium
rhenium / filter_track.rb
Created February 15, 2014 08:15
mikutter のライセンスに準じます
Plugin.create :filter_track do
querybox = ::Gtk::Entry.new()
querycont = ::Gtk::VBox.new(false, 0)
searchbtn = ::Gtk::Button.new(_('検索'))
querycont.
closeup(::Gtk::HBox.new(false, 0).
pack_start(querybox).
closeup(searchbtn))
@rhenium
rhenium / gist:9035454
Created February 16, 2014 14:52
mikutter おちた
./mikutter.rb: [BUG] Segmentation fault at 0x00000000000038
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-linux]
-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0002 E:0025d8 TOP [FINISH]
-- C level backtrace information -------------------------------------------
ruby(+0x1871dc) [0x7f32dc25c1dc]
ruby(+0x1f9cb3) [0x7f32dc2cecb3]
(function() {
var scheme, host, path;
if (location.hostname == "twitter.com") {
scheme = "http"; host = "aclog.koba789.com";
var matches = location.pathname.match(/^(\/\w{1,20})(\/favorites)?(?:(?:\/status(?:es)?)(\/\d+))?$/);
if (matches) {
if (matches[2]) {
path = matches[1] + "/discoveries";
} else if (matches[3]) {
path = "/i" + matches[3];
@rhenium
rhenium / .zshrc
Created March 30, 2014 11:29
Powerline 的なやつ(Powerline 重いっす)
function weakline_precmd() {
last_code=$?
export PROMPT="$(/srv/sh/weakline-zsh/weakline -m left -l $last_code)"
export RPROMPT="$(/srv/sh/weakline-zsh/weakline -m right -l $last_code)"
}
precmd_functions+=(weakline_precmd)
@rhenium
rhenium / gist:10718767
Created April 15, 2014 09:50
SmartOS で EventMachine gem の native extensions がコンパイルできないたすけて
[root@gitlab /home/git/gitlab]# gem install eventmachine
Fetching: eventmachine-1.0.3.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing eventmachine:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for main() in -lssl... yes
checking for main() in -lcrypto... yes
checking for openssl/ssl.h... yes
/opt/local/lib/ruby/vendor_ruby/2.0.0/rubygems/version.rb:290: [BUG] Segmentation fault
ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-solaris2.11]
-- Control frame information -----------------------------------------------
c:0015 p:---- s:0069 e:000068 CFUNC :scan
c:0014 p:0025 s:0065 e:000064 METHOD /opt/local/lib/ruby/vendor_ruby/2.0.0/rubygems/version.rb:290
c:0013 p:0049 s:0062 e:000061 METHOD /opt/local/lib/ruby/vendor_ruby/2.0.0/rubygems/version.rb:318
c:0012 p:0042 s:0050 e:000049 BLOCK /opt/local/lib/ruby/vendor_ruby/2.0.0/rubygems/specification.rb:696 [FINISH]
c:0011 p:---- s:0045 e:000044 CFUNC :sort!
c:0010 p:0008 s:0042 e:000041 METHOD /opt/local/lib/ruby/vendor_ruby/2.0.0/rubygems/specification.rb:693
diff --git a/core/plugin/openimg/openimg.rb b/core/plugin/openimg/openimg.rb
index 4e070de..5e642df 100644
--- a/core/plugin/openimg/openimg.rb
+++ b/core/plugin/openimg/openimg.rb
@@ -30,6 +30,10 @@ Plugin.create :openimg do
w.set_size_request(320, 240)
w.set_default_size(*@size).move(*@position)
w.signal_connect(:destroy){ w.destroy }
+ w.ssc(:key_press_event) { |widget, event|
+ if "Escape" == Gtk::keyname([event.keyval, event.state])