This file contains hidden or 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
| unbind C-b | |
| set -g prefix C-a | |
| setw -g utf8 on | |
| set-option -g utf8 on | |
| set-option -g status-utf8 on | |
| set -g default-terminal "screen-256color" | |
| set-option -g visual-activity on |
This file contains hidden or 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
| escaped = CGI.unescape(query) | |
| return escaped if escaped.valid_encoding? | |
| %w[EUC-JP Shift_JIS].each do |encoding| | |
| s = escaped.force_encoding(encoding) | |
| return s.encode("UTF-8") if s.valid_encoding? | |
| end | |
| escaped |
This file contains hidden or 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 -wW1 | |
| require File.expand_path("../nb-keyboard", __FILE__) | |
| EM.run { | |
| spinner = EventMachine::PeriodicTimer.new(0.5) do | |
| $stderr.print "." | |
| end | |
| Fiber.new { | |
| EM.open_keyboard(NbKeyboard) do |kb| |
This file contains hidden or 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
| set guifont=Inconsolata:h10.5 | |
| colors ir_black | |
| " cspoc binary files are Ruby | |
| au BufRead,BufNewFile cspoc-* set ft=ruby | |
| " map CMD-SHFT-M to :TList | |
| map <D-M> :Tlist<CR> | |
| " have Taglist gain focus when you open it | |
| let Tlist_GainFocus_On_ToggleOpen = 1 |
This file contains hidden or 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 -wW1 | |
| require 'eventmachine' | |
| module EventMachine | |
| # @see http://eventmachine.rubyforge.org/EventMachine.html#M000491 | |
| def self.popen3(cmd, handler=nil, *args) | |
| klass = klass_from_handler(Connection, handler, *args) | |
| w = Shellwords::shellwords(cmd) | |
| w.unshift(w.first) if w.first |
NewerOlder