openpgp4fpr:1e565fa7b310cfc1b144d93c2dfe34085e97ce47
This file contains hidden or 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
| def hello | |
| puts "hello" | |
| end | |
| Task.new do | |
| using PipeOUT | |
| puts "hello" # パイプに書く | |
| hello # パイプに書く? | |
| end |
This file contains hidden or 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
| $c=%,$c=%%%%%%%%%c%%%%s%%c;puts$c%%%%%%%%44%%%%%%%%44%%%%%%%%$c,;puts$c%44%44%$c |
This file contains hidden or 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
| def foo | |
| x = 1 | |
| x | |
| y | |
| end |
This file contains hidden or 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
| voyager:~$ ruby -v -r commonmarker -e 0 | |
| ruby 4.0.0dev (2025-12-18T07:42:20Z master 85ff21c9e5) +PRISM [x86_64-linux] | |
| /home/shugo/.rbenv/versions/master/lib/ruby/gems/4.0.0+1/gems/commonmarker-2.6.0/lib/commonmarker/extension.rb:13:in 'Kernel#require': incompatible ABI version of binary - /home/shugo/.rbenv/versions/master/lib/ruby/gems/4.0.0+1/gems/commonmarker-2.6.0/lib/commonmarker/commonmarker.so (LoadError) | |
| from /home/shugo/.rbenv/versions/master/lib/ruby/gems/4.0.0+1/gems/commonmarker-2.6.0/lib/commonmarker/extension.rb:13:in '<top (required)>' | |
| from /home/shugo/.rbenv/versions/master/lib/ruby/gems/4.0.0+1/gems/commonmarker-2.6.0/lib/commonmarker.rb:3:in 'Kernel#require_relative' | |
| from /home/shugo/.rbenv/versions/master/lib/ruby/gems/4.0.0+1/gems/commonmarker-2.6.0/lib/commonmarker.rb:3:in '<top (required)>' | |
| from <internal:/home/shugo/.rbenv/versions/master/lib/ruby/4.0.0+1/rubygems/core_ext/kernel_require.rb>:144:in 'Kernel#require' | |
| /home/shugo/.rbenv/versions/master/lib/ru |
This file contains hidden or 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" | |
| SPACES = ["\0", *("\t".."\r"), " "].join | |
| TARGET = SPACES + "x" * 1024 + SPACES | |
| Benchmark.bmbm do |x| | |
| x.report("strip()") do | |
| 10000.times do | |
| TARGET.strip | |
| end |
This file contains hidden or 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
| voyager:tmp$ cat b.rb | |
| require "benchmark" | |
| TARGET = " \t\r\n\f\v\0" + "x" * 1024 + "\0 \t\r\n\f\v" | |
| Benchmark.bmbm do |x| | |
| x.report("strip") do | |
| 10000.times do | |
| TARGET.strip | |
| end |
This file contains hidden or 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
| mastodon@akagi:~/live$ psql -U mastodon -d mastodon_production -c "SELECT COUNT(*), COUNT(CASE WHEN file_storage_schema_version IS NULL OR file_storage_schema_version < 1 THEN 1 END) as old_schema, COUNT(CASE WHEN file_storage_schema_version >= 1 THEN 1 END) as new_schema, COUNT(CASE WHEN remote_url != '' THEN 1 END) as remote FROM media_attachments WHERE thumbnail_file_name IS NOT NULL;" | |
| count | old_schema | new_schema | remote | |
| -------+------------+------------+-------- | |
| 13 | 0 | 13 | 13 | |
| (1 row) |
This file contains hidden or 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
| #!/bin/bash | |
| set -euo pipefail | |
| # Configurable variables | |
| INSTANCE_DIR="/home/mastodon/live" | |
| SYSTEM_DIR="/home/mastodon/live/public/system" | |
| BACKUP_DIR="/home/mastodon/backup" | |
| BACKUP_LIFETIME_DAYS=30 | |
| DATE_FORMAT="%Y%m%d" | |
| DB_USER="mastodon" |
NewerOlder