% curl -s https://gist.githubusercontent.com/matsubo/203ab161b8cc5d0e7495b1c24665ac02/raw/d937c1cd5922992795038e8e58a52edfa413265b/bedrock.service > bedrock.service
% vi bedrock.service # edit user name and path.
% sudo mv bedrock.service /etc/systemd/system/
% sudo chown root.root /etc/systemd/system/bedrock.service
% sudo systemctl start bedrock
% sudo systemctl status bedrock.service
This file contains 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
<?php | |
$result = [ | |
0 => 0, | |
1 => 0 | |
]; | |
for ($i = 0 ; $i < 100000000 ; $i++) { | |
$rand_number = mt_rand(); |
This file contains 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
diff --git a/Gemfile b/Gemfile | |
index ddc9c44..d824388 100644 | |
--- a/Gemfile | |
+++ b/Gemfile | |
@@ -96,4 +96,6 @@ group :test do | |
gem 'capybara-screenshot' | |
gem 'rspec-rails' | |
+ gem "timecop" | |
end |
This file contains 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
gem 'rubocop', require: false | |
gem 'rubocop-performance', require: false | |
gem 'rubocop-rails', require: false | |
gem 'rubocop-rspec', require: false |
This file contains 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
version: '3.8' | |
services: | |
nginx: | |
image: nwtgck/nginx-http3 | |
ports: | |
- '443:443/udp' | |
restart: always | |
volumes: | |
- ./nginx.conf:/usr/local/nginx/conf/nginx.conf | |
- /etc/letsencrypt/live/train.teraren.com/fullchain.pem:/etc/ssl/certs/server.crt |
This file contains 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
irb(main):001:0> require 'carmen' | |
=> true | |
irb(main):002:0> include Carmen | |
=> Object | |
irb(main):003:0> jp = Country.named('Japan') | |
=> <#Carmen::Country name="Japan"> | |
irb(main):004:0> jp.subregions? | |
=> true | |
irb(main):005:0> jp.subregions | |
=> |
This file contains 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
FROM ruby:3 | |
RUN mkdir /app | |
WORKDIR /app | |
ADD Gemfile /app/Gemfile | |
ADD Gemfile.lock /app/Gemfile.lock | |
RUN bundle install | |
ADD . /app |
- OAS3 (OpenAPI Specification Version 3) で書かれている仕様書とAPIのまとめです。
- OpenAPIで記述されたAPI仕様書はサンプルはWeb上に公開されているケースが多いですが、実際に運用されているAPIの仕様書が公開されている例が少ないのでこちらでまとめておきます。
- OpenAPI Specification
- https://postcode.teraren.com/openapi/postcode.teraren.com.yml
This file contains 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
<div class="form-control w-full max-w-full" data-controller="doc"> | |
<label class="label"> | |
<span class="label-text">経度</span> | |
</label> | |
<input type="text" data-doc-target="lon" name="lon" id="lon" placeholder="139.738999" value="" | |
class="input input-bordered w-full max-w-xs" /> | |
<label class="label"> | |
<span class="label-text">緯度</span> | |
</label> |
This file contains 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
RUN bin/download-chromedriver.sh && mv chromedriver /usr/local/bin/ |