classDiagram
Animal <|-- Duck
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Trigger event | pull_request |
pull_request_target |
push |
---|---|---|---|
github.ref |
refs/pull/53/merge | refs/heads/main | refs/heads/test/pull_request_target |
github.head_ref |
test/pull_request_target | test/pull_request_target | - |
main
: default branchtest/pull_request_target
: topic branch name53
: pull request number
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
# Check server process is using jemalloc | |
# ref. [Japanese] https://tech.studyplus.co.jp/entry/2019/09/09/094140 | |
class AppController < ActionController::Base | |
def show | |
r = `strings /proc/#{Process.pid}/maps | grep jemalloc` | |
render plain: "<h1>#{ENV['LD_PRELOAD'].presence || 'empty'}</h1><pre>#{r}</pre>" | |
end | |
end |
- level-1
- level-3
- level-2
- level-2
- level-3
* level-3
- level-2
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 a | |
doc = <<-EOS | |
def hello | |
puts "Hello World!" | |
end | |
EOS | |
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
require 'benchmark/ips' | |
Benchmark.ips do |x| | |
ary = [] | |
x.report(:a) { | |
10_000.times do |num| | |
ary << "#{num} #{num * 2} #{num * 3}" | |
end | |
} |
Try rails/webpacker
gem 'webpacker', github: "rails/webpacker"
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
resource "digitalocean_droplet" "web" { | |
image = "ubuntu-16-04-x64" | |
name = "web-1" | |
region = "sgp1" | |
size = "512mb" | |
ssh_keys = [12345] | |
connection { | |
type = "ssh" | |
user = "root" |
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 -x | |
set -e | |
export DEBIAN_FRONTEND=noninteractive | |
curl -LO https://dev.mysql.com/get/mysql-apt-config_0.7.3-1_all.deb | |
echo mysql-apt-config mysql-apt-config/select-product select Apply | sudo debconf-set-selections | |
echo mysql-apt-config mysql-apt-config/select-server select mysql-5.7 | sudo debconf-set-selections | |
echo mysql-apt-config mysql-apt-config/select-connector-python select none | sudo debconf-set-selections |