Linux 5.10.6-gentoo #1 SMP PREEMPT Mon Jan 11 02:51:36 JST 2021 x86_64 AMD Ryzen 9 5900X 12-Core Processor AuthenticAMD GNU/Linux
% cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
class Foo | |
attr_reader :hoge, :fuga, | |
def initialize(a, b) | |
p a | |
p b | |
end | |
end | |
Foo.new # => no error |
#!/bin/bash | |
id=$(pw-dump Node | jq -r 'map({id: .id, class: .info.props["media.class"], desc: .info.props["node.description"]} | select(.desc != null)) | sort_by(.class, .desc) | .[] | [.id, .class, .desc] | @tsv' | wofi -di | cut -f 1) | |
if [ -n "$id" ]; then | |
echo "Setting default to $id" | |
wpctl set-default $id | |
fi |
instance_ids="" | |
device_name="" | |
for vol in $(aws ec2 describe-instances --region ap-northeast-1 --instance-ids ${instance_ids} | jq '.Reservations[].Instances[] | .BlockDeviceMappings[] | select(.DeviceName == "'${device_name}'") | .Ebs.VolumeId' -r); do | |
current=$(aws ec2 describe-volumes --volume-ids ${vol} | jq '.Volumes[] | .Size') | |
target=$(expr $current + 50) | |
echo "${vol}: ${current} -> ${target}" | |
echo "aws ec2 modify-volume --volume-id ${vol} --size ${target} --dry-run" | |
#aws ec2 modify-volume --volume-id ${vol} --size ${target} --dry-run | |
done |
for i in [1, 2, 3] | |
p i | |
j = i | |
end | |
p j | |
[1, 2, 3].each do |k| | |
l = k | |
end |
require "debug_inspector" | |
class Foo | |
def meth1(&block) | |
RubyVM::DebugInspector.open do |dc| | |
iseq = dc.frame_iseq(2) | |
trace = TracePoint.new(:b_return) do |tp| | |
pp tp | |
tp.disable | |
end |
class Symbol | |
alias :& :to_proc | |
end | |
pp ((1..)%2).each.lazy.map(&(:succ.& >> :succ.& >> :to_s.&)).take(10).force |
class Object | |
def defer(method, *args) | |
@current_fibers ||= [] | |
@tracepoint ||= TracePoint.trace(:return) do |tp| | |
@current_fibers.reverse_each do |fib| | |
fib.resume | |
end | |
end | |
@current_fibers << Fiber.new do |
class C1 | |
def meth | |
end | |
end | |
class C2 < C1 | |
def meth | |
end | |
end |
Oct 04 22:05:37 ip-172-31-11-88 fluentd-aggregator: 2017-10-04 13:05:31 +0000 [error]: #0 unexpected error on reading data host="ip-172-31-14-22.ap-northeast-1.compute.internal" port=34018 error_class=NoMethodError error="undefined method `[]=' for nil:NilClass"
Oct 04 22:05:37 ip-172-31-11-88 fluentd-aggregator: 2017-10-04 13:05:31 +0000 [error]: #0 /fluentd/etc/vendor/bundle/ruby/2.3.0/gems/fluentd-0.14.20/lib/fluent/plugin/in_forward.rb:367:in `block in add_source_info'
Oct 04 22:05:37 ip-172-31-11-88 fluentd-aggregator: 2017-10-04 13:05:31 +0000 [error]: #0 /fluentd/etc/vendor/bundle/ruby/2.3.0/gems/fluentd-0.14.20/lib/fluent/event.rb:264:in `block in each'
Oct 04 22:05:37 ip-172-31-11-88 fluentd-aggregator: 2017-10-04 13:05:31 +0000 [error]: #0 /fluentd/etc/vendor/bundle/ruby/2.3.0/gems/fluentd-0.14.20/lib/fluent/event.rb:261:in `feed_each'
Oct 04 22:05:37 ip-172-31-11-88 fluentd-aggregator: 2017-10-04 13:05:31 +0000 [error]: #0 /fluentd/etc/vendor/bundle/ruby/2.3.0/gems/fluentd-0.14.20/lib/f