Skip to content

Instantly share code, notes, and snippets.

View yokawasa's full-sized avatar
:octocat:
debugging

Yoichi Kawasaki yokawasa

:octocat:
debugging
View GitHub Profile
@yokawasa
yokawasa / book-api-client-generation.md
Last active December 4, 2025 09:15
Book API client code generation using Postman MCP (Code)

Book API client code generation using Postman MCP (Code)

1. Configure MCP Server in your IDE

VS Code (.vscode/mcp.json)

{
  "servers": {
 "postman-mcp-server-code": {
@yokawasa
yokawasa / setup-iam-role-bedrock-agentcore-runtime.sh
Last active September 7, 2025 06:37
IAM role for Bedrock Agent Runtime
# This is fully refered by https://qiita.com/inoue_d/items/e38940fff7a31b8fc7c7
# リージョンは us-east-1 を指定する。As of 2025-09-07 US East (N. Virginia), US West (Oregon), Europe (Frankfurt), Asia Pacific (Sydney) are avaiable
set -e -x
export AWS_REGION=us-east-1
# アカウントIDの取得
export AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
# 信頼関係
@yokawasa
yokawasa / ai-agent-architecture.md
Last active September 6, 2025 00:49
AI Agent System Architecture Overview

アーキテクチャ概要

graph TD
  subgraph クライアント
    APP[PC/Mobileアプリ]
  end
  APP --> GW[APIゲートウェイ]
  GW --> ORCH[Agent Orchestrator]
 ORCH --> POL[ポリシー/ガードレール]
@yokawasa
yokawasa / postman-cli-env-bar.md
Last active September 6, 2025 00:50
Postman CLIでPostmanコレクションまたはフォルダーレベルのテスト実行時にクレデンシャル情報をenv-bar経由で渡す方法

Postman CLIのenv-barオプションについて

Postman CLIでは、コレクション(or フォルダ)配下のテスト実行時に次のように--env-barオプションで環境変数の情報を指定できる

postman login --with-api-key <postman-api-key>
postman collection run <Collection ID> -i <Folder ID> --env-var key=value

この機能を利用すれば、もしあるAPIリクエスト設定で秘匿情報を扱う必要がある場合、その秘匿情報(ここではAPIキー)を次のように変数化({{api-key}})しておけば、実行時に秘匿情報を外部から注入が可能となる

@yokawasa
yokawasa / awk-tree
Last active October 4, 2025 00:20
AWK version of tree command
#!/bin/sh
# 指定ディレクトリまたは現在のディレクトリを使用
[ -d "$1" ] && DIR=$1 && shift || DIR=.
# ディレクトリを絶対パスに変換
(cd ${DIR}; pwd)
# ディレクトリ内のファイルとサブディレクトリをツリー表示
find "${DIR}" | \
awk -v dir="${DIR}" '
function is_dir(path, cmd, result) {
cmd = "test -d \"" dir path "\" && echo 1 || echo 0"
@yokawasa
yokawasa / update-postman-collection.yml
Last active June 21, 2025 23:07
GitHub Actions that update Postman Collection based upon OpenAPI Spec using openapi-to-postman
name: Update Postman Collection
on:
pull_request:
branches: [main]
types: [opened, synchronize]
env:
# OpenAPI file path
OPENAPI_FILE: oas/openapi.yaml
@yokawasa
yokawasa / github-markdown-sandbox.md
Created April 13, 2025 02:50
GitHub markdown sandbox
@yokawasa
yokawasa / sample-openapi.yaml
Last active March 4, 2025 17:19
Simple samples of Postman Collection and OpenAPI (3.0 format). Both are minimal examples focused on the function of "getting user information".
openapi: 3.0.3
info:
title: Sample API
version: 1.0.0
servers:
- url: https://api.example.com
paths:
/users:
get:
summary: Get all users
@yokawasa
yokawasa / openai-realtime-agents.md
Last active January 18, 2025 18:00
OpenAI Realtime Agents Samples