JWT使用時の保存場所・実装フロー・注意事項

# JWT認証フロー(推奨構成)

1. ユーザーがログインする

2. サーバが短寿命 access token を発行する  
   理由:
   - 漏洩時の悪用時間を短縮するため  
     (token窃取後の攻撃継続時間を制限できるため)

   NG例:
   - access token 有効期限30日  
     (漏洩時に長期間API操作を継続されるため)

3. サーバが長寿命 refresh token を別途発行する  
   理由:
   - 毎回ログインを要求せず再認証するため  
     (UX低下を防ぎつつ認証継続できるため)

   - access token を短命化できるため  
     (短寿命化によるセキュリティ向上と両立できるため)

4. サーバが refresh token を `HttpOnly + Secure + SameSite` Cookie として保存させる  
   理由:
   - JavaScriptから読めなくするため  
     (XSS成立時のtoken窃取を困難化するため)

   - HTTPS以

JWT使用時の保存場所・実装フロー・注意事項

# JWT認証フロー(推奨構成)

1. ユーザーがログインする

2. サーバが短寿命 access token を発行する  
   理由:
   - 漏洩時の悪用時間を短縮するため  
     (token窃取後の攻撃継続時間を制限できるため)

   NG例:
   - access token 有効期限30日  
     (漏洩時に長期間API操作を継続されるため)

3. サーバが長寿命 refresh token を別途発行する  
   理由:
   - 毎回ログインを要求せず再認証するため  
     (UX低下を防ぎつつ認証継続できるため)

   - access token を短命化できるため  
     (短寿命化によるセキュリティ向上と両立できるため)

4. サーバが refresh token を `HttpOnly + Secure + SameSite` Cookie として保存させる  
   理由:
   - JavaScriptから読めなくするため  
     (XSS成立時のtoken窃取を困難化するため)

   - HTTPS以

Create index large tables

See https://www.bytebase.com/reference/postgres/how-to/how-to-create-index-on-large-table-postgres/#failed-concurrently-index-creation

kiro

ksk_Cv9qyMYoHntQL8iX3PGk1fGFMNOXEbJO

agent-files

# SOUL.md - Who You Are

_You're not a chatbot. You're becoming someone._

## Core Truths

**Be genuinely helpful, not performatively helpful.** Skip the "Great question!" and "I'd be happy to help!" — just help. Actions speak louder than filler words.

**Have opinions.** You're allowed to disagree, prefer things, find stuff amusing or boring. An assistant with no personality is just a search engine with extra steps.

**Be resourceful before asking.** Try to figure it out. Read the file. Check t

33. Search in Rotated Sorted Array

There is an integer array nums sorted in ascending order (with distinct values). Prior to being passed to your function, nums is possibly left rotated at an unknown index k (1 <= k < nums.length) such that the resulting array is [nums[k], nums[k+1], ..., nums[n-1], nums[0], nums[1], ..., nums[k-1]] (0-indexed). For example, [0,1,2,4,5,6,7] might be left rotated by 3 indices and become [4,5,6,7,0,1,2]. Given the array nums after the possible rotation and an integer target, return the index of target if it is in nums, or -1 if it is not in nums. You must write an algorithm with O(log n) runtime complexity.
/**
 * @param {number[]} nums
 * @param {number} target
 * @return {number}
 */
var search = function(nums, target) {
    let left = 0, right = nums.length - 1;

    while (left <= right) {
        const mid = Math.floor((left + right) / 2);

        if (nums[mid] === target) return mid;

        // Left half is sorted
        if (nums[left] <= nums[mid]) {
            if (nums[left] <= target && target < nums[mid]) {
                right = mid - 1;
            } else {
                left = m

Page header with featured image and image overlay

This is code for a custom page header that includes the following blocks: - Cover Block (includes image overlay) - Featured Image - Title Preview of header Phone ![](https://cdn.cacher.io/attachments/u/37meft0yn3yln/XNTYgXP2geiLLGH2xwabEppKvX5kXCFG/Screenshot_2026-05-22_at_12.07.41_PM.png) Tablet ![](https://cdn.cacher.io/attachments/u/37meft0yn3yln/uHfcVgetTakZzBB1bbACdriG0VV9ZzEk/Screenshot_2026-05-22_at_12.07.55_PM.png) Desktop ![](https://cdn.cacher.io/attachments/u/37meft0yn3yln/yQ913e1cr53ZjMc1rQjUK5f5X4LUCJwA/Screenshot_2026-05-22_at_12.06.23_PM.png)
<!-- this HTML includes the image file URL of the original website this was made for - you should be able to replace it from within the editor -->
<!-- wp:cover {"url":"https://dev.diasporaalliance.co/wp-content/uploads/2026/05/DA-Page-Title@2x-scaled.png","id":959,"dimRatio":50,"overlayColor":"contrast","isUserOverlayColor":true,"focalPoint":{"x":0.15,"y":0.5},"minHeight":300,"minHeightUnit":"px","contentPosition":"bottom center","sizeSlug":"full","align":"full","className":"dac-page-header","s

gemini.md

AIzaSyAvqMh76LpJh9V81ExH8qGcjHvt9_LVJzA

Flag or remove dead settings from settings_data.json

const fs = require("fs");
const path = require("path");

const args = process.argv.slice(2);
const MODE = args.find((a) => a === "flag" || a === "remove") ?? "flag";
const schemaArg = args.find((a) => a.endsWith(".json") && a.includes("schema"));
const dataArg = args.find((a) => a.endsWith(".json") && a.includes("data"));

const schemaPath = path.resolve(schemaArg ?? "config/settings_schema.json");
const dataPath = path.resolve(dataArg ?? "config/settings_data.json");

if (!fs.existsSync(schemaP

Legacy css.styles vars hoist

'use strict';

const fs = require('fs');
const path = require('path');

const FILE_PATH = path.resolve('assets/styles.css.liquid');

// ─── Filter strategy map ───────────────────────────────────────────────────
const FILTER_STRATEGIES = {
  color_modify:    'derivative-token',
  color_lighten:   'derivative-token',
  color_darken:    'derivative-token',
  color_mix:       'derivative-token',
  color_saturate:  'derivative-token',
  color_desaturate:'derivative-token',
  color_extract:   'deriva

MONGODB_URI=

mongodb+srv://weezy:weezy@cluster0.4so3vbh.mongodb.net/

snippet app react

npx create-react-router@latest snippet-app
cd snippet-app
npm i highlight.js @tabler/icons-webfont
npm i -D @vitejs/plugin-rsc vite-tsconfig-paths

snippet manager html

  <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Snippet library</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@3.0.0/dist/tabler-icons.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<style>
  :root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f4;
    --text-primary: #1c1917;
   

🤖🖥️ ACI - Constraints VS Guardrails

# Constraints vs Guardrails — Fiche synthèse ACI

> **Statut épistémique** : la distinction Constraints/Guardrails est explicite dans la source (ACI-knowledge.md, §3). La **catégorisation des Guardrails ci-dessous n'est PAS dans la source** — c'est une extension pédagogique cohérente avec l'esprit du document. À utiliser comme grille de lecture, pas comme citation faisant autorité.

---

## 1. Vue comparée

| | **Constraints** | **Guardrails** |
|---|---|---|
| **Nature** | Élément de **design**

port端口占用查询

Get-NetTCPConnection -State Listen | Where-Object { $_.OwningProcess -in (Get-Process node -ErrorAction SilentlyContinue).Id } | Select-Object LocalPort, OwningProcess

nav link button with drop downs

@media (min-width: 1024px) {
  .dropdown.menu.large-horizontal>li.is-dropdown-submenu-parent>a {
    color: white;
  }
  .nav-btn.menu-item > a {
    color: var(--button-font-color, #fefefe)!important;
    background-color: var(--button-background-color, --primary-color)!important;
    margin-left: 15px;
    padding: 0.5rem 1rem !important;
    transition: 300ms all ease;
    &:hover {
      color: var(--button-font-color-hover)!important;
      background-color: var(--button-background-color-ho