- APIリファレンス
- 新しいトークンを作る
読み取り:予定
を含める。
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
#!/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 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 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 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 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 |
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
#!/usr/bin/env ruby | |
dir = File.expand_path('..', __dir__) | |
$LOAD_PATH.unshift(File.join(dir, 'app/lib')) | |
ENV['BUNDLE_GEMFILE'] = File.join(dir, 'Gemfile') | |
require 'mulukhiya' | |
ROOT_URL = 'https://www.toei-anim.co.jp/tv/delicious-party_precure/'.freeze | |
SOURCE_URL = 'https://www.toei-anim.co.jp/tv/delicious-party_precure/news/'.freeze | |
Dir.chdir(dir) |
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
#!/usr/bin/env ruby | |
dir = File.expand_path('..', __dir__) | |
$LOAD_PATH.unshift(File.join(dir, 'app/lib')) | |
ENV['BUNDLE_GEMFILE'] = File.join(dir, 'Gemfile') | |
require 'tomato_shrieker' | |
module TomatoShrieker | |
class ::Integer | |
def to_time | |
return Time.at(self / 1000) |
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
#!/usr/bin/env ruby | |
dir = File.expand_path('..', __dir__) | |
$LOAD_PATH.unshift(File.join(dir, 'app/lib')) | |
ENV['BUNDLE_GEMFILE'] = File.join(dir, 'Gemfile') | |
require 'tomato_shrieker' | |
module TomatoShrieker | |
class ::Integer | |
def to_time | |
return Time.at(self / 1000) |
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
#!/usr/bin/env ruby | |
dir = File.expand_path('..', __dir__) | |
$LOAD_PATH.unshift(File.join(dir, 'app/lib')) | |
ENV['BUNDLE_GEMFILE'] = File.join(dir, 'Gemfile') | |
CHARACTER_URL = 'https://mstdn.delmulin.com/api/character/v1/detail.json'.freeze | |
ANNIVERSARY_URL = 'https://mstdn.delmulin.com/api/anniversary/v1/common.json'.freeze | |
require 'tomato_shrieker' | |
module TomatoShrieker |
NewerOlder