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
require 'json' | |
require 'open-uri' | |
require 'uri' | |
require 'websocket-client-simple' | |
class ChromeDebugger | |
class CmdError < StandardError | |
attr_reader :data | |
def initialize(data) | |
@data=data |
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
require 'rbplotly' | |
# monkey patch | |
class IRuby | |
def self.display(html) | |
html.render.sub(/style="height: 100%; width: 100%;"/,'style=""') | |
end | |
end |
This file has been truncated, but you can view the full file.
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
<html><head> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.5/require.min.js"></script><meta charset="utf-8" /> | |
<!-- generated by ansi-to-html 0.0.3 https://github.com/uu59/ansi-to-html --> | |
</head><body style="color:#fff;background-color:#000"> | |
<pre> | |
Starting master_postgres_1 ... | |
AK Starting master_postgres_1 ... <span style='color:#0A0;'>done</span> BStarting master_redis_1 ... | |
Starting master_mysql_1 ... | |
AK Starting master_redis_1 ... <span style='color:#0A0;'>done</span> BAK Starting master_mysql_1 ... <span style='color:#0A0;'>done</span> Bpostgres:5432 - accepting connections | |
mysqld is alive |
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/local/lib/ruby/2.6.0/rubygems/util.rb:17: [BUG] Segmentation fault at 0x00007f59172a5e50 | |
ruby 2.6.0dev (2018-06-22) [x86_64-linux] | |
-- Control frame information ----------------------------------------------- | |
c:0025 p:---- s:0175 e:000174 CFUNC :read | |
c:0024 p:---- s:0172 e:000171 CFUNC :readpartial | |
c:0023 p:---- s:0169 e:000168 CFUNC :read | |
c:0022 p:0047 s:0165 e:000164 METHOD /usr/local/lib/ruby/2.6.0/rubygems/util.rb:17 | |
c:0021 p:0184 s:0159 e:000158 METHOD /usr/local/lib/ruby/2.6.0/rubygems/remote_fetcher.rb:294 | |
c:0020 p:0039 s:0150 e:000149 METHOD /usr/local/lib/ruby/2.6.0/rubygems/remote_fetcher.rb:325 |
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
# Copy from https://github.com/docker-library/ruby/blob/752c5f7cf44870ceae77134b346d20093053c370/2.4/Dockerfile | |
FROM buildpack-deps:jessie | |
# skip installing gem documentation | |
RUN mkdir -p /usr/local/etc \ | |
&& { \ | |
echo 'install: --no-document --platform ruby'; \ | |
echo 'update: --no-document'; \ | |
} >> /usr/local/etc/gemrc |
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
require 'benchmark/ips' | |
f=proc{} | |
g=proc{|i| i>0 ? g.call(i-1):0 } | |
N=2000 | |
Benchmark.ips do |x| | |
x.report("f"){ f.call } | |
x.report("g"){ g.call(N) } | |
end | |
# ====== before ================================= | |
Warming up -------------------------------------- |
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
data=`perf annotate -svm_exec_core --show-total-period --stdio`.split(/\n/) | |
ins="before" | |
cnt=Hash.new{0} | |
total=0 | |
data.each{|line| | |
case line | |
when /INSN_ENTRY\((.*)\)/ | |
ins = $1 | |
when /END_INSN/ | |
ins = "none" |
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
From d05d3e3b95d354f5f59232ace4db24ff859a5bcd Mon Sep 17 00:00:00 2001 | |
From: Masaya TARUI <tarui@prx.jp> | |
Date: Tue, 4 Mar 2014 20:22:13 +0900 | |
Subject: [PATCH] introduce st_foreach_update, st_foreach_update_check | |
--- | |
hash.c | 47 ++++++++++------ | |
internal.h | 5 ++ | |
st.c | 177 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
3 files changed, 214 insertions(+), 15 deletions(-) |
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
24689222839,0 | |
ENV: Ruby | |
※締め切り後に調べた内容で解説を再編集しています。 | |
Binary Indexed Treeとか知りませんでした(汗 | |
インデックスの振り方が大変独特ですね。。。 | |
https://twitter.com/debiru/status/374400678182928384 | |
から | |
プログラミングコンテストでのデータ構造 |
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
$ tail -n2 *.log | |
==> 193p194_1.log <== | |
21.601350999999987 | |
31.410000 0.490000 31.900000 ( 31.928621) | |
==> 193p194_2.log <== | |
20.781295 | |
29.910000 0.330000 30.240000 ( 30.335949) | |
==> 193p194_3.log <== |
NewerOlder