Skip to content

Instantly share code, notes, and snippets.

Avatar

Yusuke Endoh mame

View GitHub Profile
@mame
mame / dev-meeting-agenda-setup.rb
Last active Apr 24, 2020
A script to create an agenda for dev-meeting https://bugs.ruby-lang.org/issues/14770
View dev-meeting-agenda-setup.rb
#!/usr/bin/env ruby
require "open-uri"
require "json"
unless ARGV[0] =~ %r{\Ahttps://bugs.ruby-lang.org/issues/(\d+)\z}
puts "Usage: #$0 https://bugs.ruby-lang.org/issues/XXXX"
exit 1
end
View gist:b86cc62fbbccc38a62c9a78696b21979
$ ./miniruby -e 'use_symbol = Object.instance_methods[0].is_a?(Symbol)
nummodule = nummethod = 0
mods = []
ObjectSpace.each_object(Module) {|m| mods << m if m.name }
mods = mods.sort_by {|m| m.name }
mods.each {|mod|
nummodule += 1
mc = mod.kind_of?(Class) ? "class" : "module"
puts "#{mc} #{mod.name} #{(mod.ancestors - [mod]).inspect}"
mod.singleton_methods(false).sort.each {|methname|
View optcarrot-stackprof.d3-flame-graph.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/spiermar/d3-flame-graph@2.0.3/dist/d3-flamegraph.css">
View optcarrot.html
<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>
{"* malloc_info gen statistics"=>[["0", "29575", "12037320"], ["1", "16031", "2734752"], ["2", "910", "5874816"], ["3", "308", "5510752"], ["4", "8", "15440"], ["5", "12", "116848"], ["6", "4", "1312"], ["7", "177", "5559128"], ["8", "103", "59848"], ["9", "8", "768"], ["10", "15", "1288"], ["11", "11", "1080"], ["12", "14", "4496"], ["13", "18", "30400"], ["14", "1", "72"], ["15", "1", "120"], ["16", "30", "232976"], ["17", "7", "504"], ["18", "0", "0"], ["19", "18", "2224"], ["20", "0", "0"], ["21", "17", "18080"], ["22", "0", "0"], ["23", "0", "0"], ["24", "0", "0"], ["25", "0", "0"], ["26", "0", "0"], ["27", "0", "0"], ["28", "0", "0"], ["29", "0", "0"], ["30", "0", "0"], ["31", "0", "0"], ["32", "0", "0"], ["33", "0", "0"], ["34", "0", "0
View README.md
View shift_reset_call_cc.txt
M1 k1 = (call/cc (M2 k1)) + 3
M2 k1 k2 = if b then (k1 1) else (k2 2)
(call/cc M1) + 4
S1 k1 = (shift (λk2. k2 (S2 k1 k2))) + 3
S2 k1 k2 = if b then (k1 1) else (k2 2)
reset(exit(shift (λk1. k1 (S1 k1)) + 4))
View struct-member-benchmark2.rb
require 'benchmark'
class MemberClass
def initialize(a, b, c, d, e, f, g)
@a = a
@b = b
@c = c
@d = d
@e = e
@f = f
View main.rb
eval(v=%(eval((e=*%w'662c3d220
214450800010840000001108420800
2084211000024cf324000000011c40
114a5288001184211c003242643c00
788c1498001194f108007a1c149800
321c9498007 844221000324c94980
032527098000 01e0780004a5e94a
400000e949c0 0421c94b8000006
420c00084e94 9c00000cb618001
148e21000421 2e4 a400308421
View main.rb
eval(v=%(eval((e=*%w'662c3d220
214450800010840000001108420800
2084211000024cf324000000011c40
114a5288001184211c003242643c00
788c1498001194f108007a1c149800
321c9498007844221000324c949800
3252709800001e0780004a5e94a400
000e949c00421c94b8000006420c00
084e949c00000cb618001148e21000
4212e4a4003084211c00001c972100
View main.rb
eval$x=%q(eval(%w(s="]k<<k7@k9
9k@,7&]-7k.@61y?c<c@9k.?isu:,e
y<?2k_i]61 o@3i>k@_]9_g36o1@
i4k?w/r?1o ?i=i?yoy65kok95
qw6?ci_:<ye g'=ok?;g'n/g?o
i2?.(]{8{)- u8c@4>]u8c-u@
gq7?@4]0;g? ;|g|;]*qkbk0e
g,_@eqqeqqg @>'] a<<0e4e5
oi{25>|>?@ c8 &7*3986
@a;;0+>*@2 _i m{@{+_(
You can’t perform that action at this time.