Skip to content

Instantly share code, notes, and snippets.

warning: parser/current is loading parser/ruby31, which recognizes3.1.0-compliant syntax, but you are running 3.1.1.
Please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.
Migrating to OptimizeNullIndexConversationsUri (20220307083603)
== 20220307083603 OptimizeNullIndexConversationsUri: migrating ================
[strong_migrations] DANGER: No lock timeout set
-- index_name_exists?(:conversations, "index_conversations_on_uri_new")
-> 0.0024s
-- add_index(:conversations, :uri, {:unique=>true, :where=>"uri IS NOT NULL", :opclass=>:text_pattern_ops, :name=>"index_conversations_on_uri_new", :algorithm=>:concurrently})
-> 47.2752s
-- index_name_exists?(:conversations, "index_conversations_on_uri")
@zunda
zunda / Makefile
Last active January 28, 2022 18:36
ねこがねころんだ
default: shuffle
echo ねこがねころんだ | ./shuffle
clean:
rm shuffle
#!/usr/bin/ruby
#
# Usage:
# $ echo わたしたわしわたしたわ | ruby koikekeiko.rb
# 11/1
# $ echo こしたんたん | ruby koikekeiko.rb
# 3/2
#
# Calculates the "saiwaisa" of the input as defined in
# 2022年度 大学入学共通テスト 本試験 情報関係基礎
@zunda
zunda / .gitignore
Last active December 30, 2021 00:00
Trying to self-modify dynamic shared library
/main
*.so
@zunda
zunda / gist:8534b47a194fef1b235b2d5f3d20279f
Created December 28, 2021 19:24
git log --oneline upstream/main...origin/master
fe7154884 (upstream/main) Fix warnings on Rails boot (#16946)
e65080181 Fix tag rendering error in hashtag column settings (#17184)
d78ddb1ce Modify Readme syntax (#17112)
4d1eaf3e6 Finish update of node-redis (#17183)
fad37dd1b Save bundle config as local (#17188)
56c55ab9f Add ReadWritePaths directive to service files (#17178)
512bc9db7 Bump redis from 3.1.2 to 4.0.1 (#17161)
7cd26c8db Bump bullet from 6.1.5 to 7.0.0 (#17154)
cde4976d4 Bump npmlog from 5.0.1 to 6.0.0 (#17026)
82fdc81ae Bump eslint-plugin-promise from 5.1.1 to 6.0.0 (#17173)
@zunda
zunda / monitor-packet-loss.rb
Created December 25, 2021 23:48
Shows rough estimates of packet loss using the `ping` command
#!/usr/bin/ruby
#
# usage: ruby monitor-packet-loss.rb <ISP's-gateway-IP-address>
# Shows rough estimates of packet loss using the `ping` command.
#
# Copyright 2021 by zunda <zundan at gmail.com>
#
# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as the
# above copyright notice is included.
@zunda
zunda / chunk-shc.rb
Created December 23, 2021 01:52
Divides the SMART Health Card into N QR codes
#!/usr/bin/ruby
#
# usage: echo shc:/0123..(decoded from a QR code) | ruby chunk-shc.rb N
# Divides the SMART Health Card into N QR codes
# https://spec.smarthealth.cards/
#
# Requres the qrencode command
#
# Copyright 2021 by zunda <zundan at gmail.com>
#
@zunda
zunda / shc-payload.rb
Last active December 14, 2022 07:07
Read the payload from a SMART Health Card
#!/usr/bin/ruby
#
# usage: echo shc:/0123..(decoded from a QR code) | ruby shc-payload.rb | jq
# Prints the payload from SMART Health Card on QR code
# https://spec.smarthealth.cards/
#
# Copyright 2021 by zunda <zundan at gmail.com>
#
# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as the
@zunda
zunda / How-to-accelerate-DX-transcript.md
Last active September 5, 2021 21:45
A transcript from the "2021-03-11 Talk with Yoko Ishikura at Sansan Evolution Week"
@zunda
zunda / check-build-cap.rb
Last active January 16, 2022 20:26
Netlifyのビルド時間が充分残っているか確認する
#!/usr/bin/ruby
require 'net/http'
require 'json'
TeamSlug = "zunda"
UserAgent = "#{File.basename($0, '.rb')} (zundan@gmail.com)"
MinMinutes = 15
begin
Token=ENV.fetch('TOKEN')