- 目的: DB データを ZFS スナップショットで運用できるようにする。
- 方針: ルートは通常どおり ext4(ZFS ルートにはしない)。3 番目のローカルディスクを ZFS データプールにして、DB のデータだけそこに置く。
- メリット: ZFS ルート化に伴う面倒(GRUB /
bpool・rpool分割、Rescue Mode での手動構築、Direct Disk 起動の切り替え)が一切不要。Linode の内蔵ディスク(ローカル NVMe)を使うので、ブロックストレージのようなネットワーク越しのレイテンシ低下もない。
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
| <!DOCTYPE html> | |
| <html lang="ja"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Markdown Viewer</title> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.10.1/jszip.min.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script> | |
| <style> |
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
| #!/usr/bin/env ruby | |
| require 'date' | |
| require 'pg' | |
| # 設定 | |
| TARGET = 'zroot/postgres' # 対象パーティション | |
| DAYS = 7 # 保管する日数 | |
| DSN = 'postgres://postgres@localhost/mastodon' # PG形式の接続文字列 | |
| def snapshots(target = TARGET) |
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
| <?php | |
| $client = new Aws\CognitoIdentityProvider\CognitoIdentityProviderClient([ | |
| 'version' => 'latest', | |
| 'region' => REGION, | |
| 'credentials' => [ | |
| 'key' => IAM_ACCESS_KEY, | |
| 'secret' => IAM_SECRET_KEY, | |
| ], | |
| ]); |
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
| /// @ 0.15.1 | |
| // おみくじぷりせっといじったよ | |
| // ぷいきゅあがんばえーー!! | |
| // 選択肢 | |
| var mioo = [ | |
| "[光の使者、キュアブラック!](https://www.youtube.com/watch?v=maiX-2d4R3w)" | |
| "[光の使者、キュアホワイト!](https://www.youtube.com/watch?v=maiX-2d4R3w)" | |
| "[輝く命、シャイニールミナス! 光の心と光の意志、全てを一つにするために!](https://www.youtube.com/watch?v=sR-dT4UMC-w)" | |
| "[輝く金の花! キュアブルーム!](https://www.youtube.com/watch?v=HcWHcS142Kw)" |
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
| #!/usr/bin/env ruby | |
| dir = File.expand_path('..', __dir__) | |
| $LOAD_PATH.unshift(File.join(dir, 'app/lib')) | |
| ENV['BUNDLE_GEMFILE'] = File.join(dir, 'Gemfile') | |
| URL = 'https://timetreeapis.com/calendars/__CALENDAR__/upcoming_events?timezone=Asia/Tokyo&days=7&include=attendees' | |
| TOKEN = '__TOKEN__' | |
| require 'tomato_shrieker' | |
| module TomatoShrieker | |
| today = ARGV.first ? Time.parse(ARGV.first).to_date : Date.today |
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
| #!/usr/bin/env ruby | |
| require 'resolv' | |
| require 'httparty' | |
| require 'timeout' | |
| File.read('./instances.txt').each_line(chomp: true) do |domain| | |
| Timeout.timeout(10) do | |
| Resolv::DNS.new.getaddress(domain) | |
| code = HTTParty.get("https://#{domain}/nodeinfo/2.0.json").code | |
| raise '404' if code == 404 |
NewerOlder