Instantly share code, notes, and snippets.

Daigo <3 Dango zunda

View GitHub Profile
View gist:658dae12b9ec8ada653343015a18b025
13:43:42 web.1 | Started GET "/api/v1/timelines/tag/thisisthetag" for 127.0.0.1 at 2019-01-06 13:43:42 -1000
13:43:42 web.1 | Processing by Api::V1::Timelines::TagController#show as HTML
13:43:42 web.1 | Parameters: {"id"=>"thisisthetag"}
13:43:42 web.1 | Doorkeeper::AccessToken Load (0.4ms) SELECT "oauth_access_tokens".* FROM "oauth_access_tokens" WHERE "oauth_access_tokens"."token" = $1 LIMIT $2 [["token", "79d80f8feb192b6932f261239ee1554e1e353e01fda59d3138c990800d10098f"], ["LIMIT", 1]]
13:43:42 web.1 | User Load (1.4ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT $2 [["id", 1], ["LIMIT", 1]]
13:43:42 web.1 | SessionActivation Load (0.4ms) SELECT "session_activations".* FROM "session_activations" WHERE "session_activations"."session_id" = $1 LIMIT $2 [["session_id", "4a0b3d5240015ee1e8a2f5710746cbe2"], ["LIMIT", 1]]
13:43:42 web.1 | Tag Load (0.5ms) SELECT "tags".* FROM "tags" WHERE "tags"."name" = $1 LIMIT $2 [["name", "thisisthetag"], ["LI
View prepare-and-start.txt
入れるのが大変なGemは入れない:
$ curl -o - https://gist.githubusercontent.com/zunda/c5f50abc1a2139d0edc1a3e6ddae2c84/raw/2a825d75fa64e5986abf685a091fc9c3ee3bdedf/run-mastodon-on-macos.patch | patch
PostgreSQLを走らせておいて、
$ export RAILS_ENV=development
$ bundle install --path=vendor/bundle
$ bundle exec rake assets:precompile
$ bundle exec rake db:drop
View rails-db-setup-backtrace.without-bootsnap.txt
/home/zunda/src/github.com/zunda/rails-dbmigrate-test/vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/lib/ffi/library.rb:275: [BUG] Segmentation fault at 0x0000005500000020
ruby 2.5.3p105 (2018-10-18 revision 65156) [aarch64-linux]
-- Control frame information -----------------------------------------------
c:0112 p:---- s:0583 e:000582 CFUNC :attach
c:0111 p:0255 s:0577 e:000576 METHOD /home/zunda/src/github.com/zunda/rails-dbmigrate-test/vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/lib/ffi/library.rb:275
c:0110 p:0064 s:0557 E:001af0 CLASS /home/zunda/src/github.com/zunda/rails-dbmigrate-test/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.9.10/lib/rb-inotify/native.rb:
c:0109 p:0007 s:0554 E:001b60 CLASS /home/zunda/src/github.com/zunda/rails-dbmigrate-test/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.9.10/lib/rb-inotify/native.rb:
c:0108 p:0014 s:0551 E:002420 TOP /home/zunda/src/github.com/zunda/rails-dbmigrate-test/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.9.10/lib/rb-inotify/native.rb: [FINISH]
c:0107 p:---- s:0
View rails-db-setup-backtrace.txt
/home/zunda/src/github.com/zunda/rails-dbmigrate-test/vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/lib/ffi/library.rb:275: [BUG] Segmentation fault at 0x0000005500000020
ruby 2.5.3p105 (2018-10-18 revision 65156) [aarch64-linux]
-- Control frame information -----------------------------------------------
c:0134 p:---- s:0709 e:000708 CFUNC :attach
c:0133 p:0255 s:0703 e:000702 METHOD /home/zunda/src/github.com/zunda/rails-dbmigrate-test/vendor/bundle/ruby/2.5.0/gems/ffi-1.9.25/lib/ffi/library.rb:275
c:0132 p:0064 s:0683 E:001920 CLASS /home/zunda/src/github.com/zunda/rails-dbmigrate-test/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.9.10/lib/rb-inotify/native.rb:
c:0131 p:0007 s:0680 E:001990 CLASS /home/zunda/src/github.com/zunda/rails-dbmigrate-test/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.9.10/lib/rb-inotify/native.rb:
c:0130 p:0014 s:0677 E:001f10 TOP /home/zunda/src/github.com/zunda/rails-dbmigrate-test/vendor/bundle/ruby/2.5.0/gems/rb-inotify-0.9.10/lib/rb-inotify/native.rb: [FINISH]
c:0129 p:---- s:0
View 01-heroku-18-without-libssl-dev.txt
$ ldd vendor/bundle/ruby/2.5.0/gems/puma-3.11.4/lib/puma/puma_http11.so
linux-vdso.so.1 (0x00007ffca71e9000)
libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f6c86954000)
libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f6c864dc000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f6c862bd000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f6c85ecc000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f6c85cc8000)
/lib64/ld-linux-x86-64.so.2 (0x00007f6c86dc8000)
View puma-segv.txt
[134] Puma starting in cluster mode...
[134] * Version 3.11.4 (ruby 2.5.1-p57), codename: Love Song
[134] * Min threads: 5, max threads: 5
[134] * Environment: production
[134] * Process workers: 1
[134] * Preloading application
Default type scope order, limit and offset are ignored and will be nullified
Creating scope :cache_ids. Overwriting existing method Notification.cache_ids.
[134] * Listening on tcp://0.0.0.0:8080
[134] ! WARNING: Detected 1 Thread(s) started in app boot:
View master-master.sh
#!/bin/sh
set -e
run () {
echo \$ "$*"
eval "$*"
}
confirm () {
echo
View rails-on-ruby260p2.sh
$ rbenv local 2.6.0-preview2
$ cat <<_END > Gemfile
source 'https://rubygems.org'
gem 'rails'
_END
$ bundle install --path=vendor/bundle
$ bundle exec rails new .
$ bundle exec rails s
$ mv config/application.rb config/application.rb.orig
$ cp config/application.rb.orig config/application.rb
View main.go
package main
import (
"fmt"
"math"
)
func main() {
x := 1.0 - math.Pow(2.0, -52)
y := math.Cbrt(x)
View game-of-life.rb
#!/usr/bin/ruby
class Board
Alive = '🥓'
Dead = '🥚'
Neighbors = [[-1,-1], [0,-1], [1,-1], [-1,0], [1,0], [-1,1], [0,1], [1,1]]
Glider = <<_END
🥚🥓🥚
🥚🥚🥓