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
# Prefix | |
set-option -g prefix C-u | |
# History mode | |
set-option -g history-limit 10000 | |
# emacs mode | |
set-window-option -g mode-keys emacs | |
# default color | |
set-option -g default-terminal screen-256color | |
# Font code for status line |
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
# | |
escape ^j^j | |
vbell off | |
hardstatus alwayslastline "[%02c] %`%-w%{=b bw}%n %t%{-}%+w" | |
startup_message off | |
autodetach on |
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
[core] | |
editor = emacs | |
[user] | |
email = [email protected] | |
name = pochi.black | |
[color] | |
ui = auto | |
[alias] | |
s = status | |
ci = commit |
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 | |
# ex) ruby gem_fetcher.rb #{TARGET_Gemfile.lock} | |
INSTALL_REGEXP = /^ ([a-zA-Z].+) ¥((.+)¥)$/ | |
open(ARGV[0]).each_line do |line| | |
if match_data = INSTALL_REGEXP.match(line).to_a and !match_data.empty? | |
gem_file_name = match_data[1] | |
gem_versin = match_data.last | |
system "gem fetch #{gem_file_name} -v #{gem_version}" |
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
* TCP backlogのOS側の設定はどこにあるのか? | |
** portごとにいくつキューを持つか設定できる | |
** RedhatのOSパラメータで持ってる | |
** C言語でSocket数を制限できるのか調査! | |
*** Listen BackLogはApache側で設定できるがOSにより設定されている場合はOS側が優先される | |
* 実質ApacheでSSLしない理由 | |
** コストが高い。Apacheの台数分ベリサインに申請する必要がある。 | |
*** SSLつき負荷分散で実現 | |
** 性能が落ちてしまう |
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 | |
require 'rubygems' | |
require 'eventmachine' | |
require 'libwebsocket' | |
module EchoServer | |
def post_init | |
puts "someone with websocket!" | |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'eventmachine' | |
require 'libwebsocket' | |
module EchoServer | |
def post_init | |
puts "someone with websocket!" | |
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 | |
require "socket" | |
require 'libwebsocket' | |
require 'eventmachine' | |
class WebSocket | |
def initialize(url, params = {}) | |
@hs ||= LibWebSocket::OpeningHandshake::Client.new(:url => url, :version => params[:version]) |
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 [1/9254] | |
require "sinatra" | |
require "json" | |
@@clients = [] | |
get "/login.json" do | |
@@clients << { :id => params[:id], :unreads => [] } |
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
# encoding: utf-8 | |
require "net/http" | |
threads = [] | |
def ping_pong(num) | |
Net::HTTP.start("localhost", 4567) do |http| | |
http.get("/login.json?id=#{num.to_s}") | |
end |
OlderNewer