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
// 公開鍵を指定して、JWK形式で出力してくれるサンプル | |
using System; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Text.Json; | |
using Org.BouncyCastle.Crypto.Parameters; | |
using Org.BouncyCastle.OpenSsl; | |
using Org.BouncyCastle.Security; |
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
// C# を使う場合、 ChatGPT がほぼ作成 | |
using System; | |
using System.IdentityModel.Tokens.Jwt; | |
using System.Security.Claims; | |
using System.Security.Cryptography; | |
using System.Text; | |
using Microsoft.IdentityModel.Tokens; | |
class Program |
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 | |
declare(strict_types=1); | |
namespace App\Handlers; | |
/** | |
* Class StringCaseHandler | |
*/ | |
class StringCaseHandler |
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 | |
const PAGE_COUNT = 100; | |
const UPLOADS_DIR = __DIR__ . '/uploads'; | |
$page = $_GET['page'] ?? 1; | |
$offset = ($page - 1) * PAGE_COUNT; | |
$sort_category = $_GET['sort_category'] ?? 'create_date'; | |
$sort_type = $_GET['sort_type'] ?? 'asc'; |
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
RewriteEngine On | |
RewriteCond %{REQUEST_URI} !(\.png|\.jpg|\.webp|\.gif|\.jpeg|\.zip|\.css|\.svg|\.js|\.pdf)$ | |
RewriteRule (.*) routes.php [QSA,L] |
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
CREATE TABLE gacha_items ( | |
id INT AUTO_INCREMENT PRIMARY KEY, | |
item_name VARCHAR(255) NOT NULL, | |
weight INT NOT NULL, | |
UNIQUE (item_name) | |
); | |
INSERT INTO gacha_items (item_name, weight) VALUES | |
('レアアイテムA', 10000), | |
('レアアイテムB', 15000), |
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
CREATE TABLE foo ( | |
id INT AUTO_INCREMENT PRIMARY KEY, | |
name VARCHAR(100), | |
point INT, | |
cnt INT, | |
num INT | |
); | |
INSERT INTO foo (name, point, cnt, num) VALUES | |
('Alice',30,50,20), |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder