Understanding the behavior of Terraform's one() function. Introduction Understanding the Behavior of one() Specification of one() Examples When to Use one() Conclusion References Introduction Terraform provides a one() function. Because the naming is so minimal, it wasn’t immediately clear how it be…| BioErrorLog Tech Blog (en)
This post explains how to output a resource in Terraform when its creation is controlled using the count parameter. Introduction Outputting Resources Controlled by count Method 1: Use the one Function Method 2: Use the try Function Conclusion References Introduction In Terraform, the count parameter…| BioErrorLog Tech Blog (en)
This article summarizes how to count the number of records in JSON using the jq command, depending on the JSON format. Introduction Environment Counting JSON Records JSON Documents with Array Wrapping JSON Documents with Object Wrapping JSON Lines Conclusion References Introduction Recently, I neede…| BioErrorLog Tech Blog (en)
Here's a quick memo on converting webp to png/jpeg with the ffmpeg command. Introduction Convert WebP to PNG or JPEG Using ffmpeg How to Do It Try It Conclusion References Introduction Sometimes you need to convert images in WebP format to PNG or JPEG. For example, images generated by DALL·E come in…| BioErrorLog Tech Blog (en)
This post explains the differences between the AWS CLI commands s3 cp and s3 sync. Introduction Key Differences Between cp and sync Comparing Descriptions Comparing Command Options Comparing Command Behaviors Simple S3 copy Copy updated S3 Conclusion References Introduction When I wanted to copy obj…| BioErrorLog Tech Blog (en)
This article summarizes how to handle errors in boto3, AWS SDK for Python. Introduction Handling Errors in boto3 Using client.exceptions Using botocore.exceptions Example Code Handling BucketAlreadyExists error in S3 create_bucket Handling NoSuchKey error in S3 get_object Handling NoSuchEntityExcept…| BioErrorLog Tech Blog (en)
This post summarizes how to perform AssumeRole using Boto3. Introduction Assuming Roles with Boto3 Implementing the AssumeRole function Example Usage Conclusion References Introduction There are many situations where you need to AssumeRole using a Python script with Boto3. Every time, I end up looki…| BioErrorLog Tech Blog (en)
This post introduces a convenient way to automate git commit using a custom slash command in Claude Code. Introduction Auto-Commit with a Custom Slash Command in Claude Code How to Do It Example Conclusion References Introduction Writing a good git commit message is important, but it can also be a t…| BioErrorLog Tech Blog (en)
This post is a quick memo on how to create custom slash commands in Claude Code. Introduction What Are Custom Slash Commands in Claude Code? How to Create Custom Slash Commands Basic Syntax and Example Commands Prompt Only Arguments Running Bash Commands File Reference Frontmatter Conclusion Referen…| BioErrorLog Tech Blog (en)
This is a quick memo on how to bulk delete all your chat history in Claude. Introduction How to Bulk Delete All Chats in Claude Steps Example Conclusion References Introduction Lately, I've been using Claude more often than ChatGPT. I couldn’t immediately figure out how to delete all chats in Claude…| BioErrorLog Tech Blog (en)
This post summarizes how to get the exit status from commands in a pipeline. Introduction How to Get Exit Statuses from a Pipeline Using PIPESTATUS Using set -o pipefail Conclusion References Introduction When you try to get the exit status of a pipeline using $?, by default, it only returns the exi…| BioErrorLog Tech Blog (en)
This post explains the CloudFormation template that sets up the backend (S3/DynamoDB) to store Terraform state. Introduction CloudFormation Template to Provision Terraform Backend Conclusion References Introduction How to provision the backend for storing Terraform state can be a point of considerat…| BioErrorLog Tech Blog (en)
This is a quick note on how to output DEBUG-level logs using the AWS CLI. Introduction Outputting DEBUG-Level Logs with AWS CLI How to do it Example Execution Conclusion References Introduction There are times when you want to run AWS CLI in DEBUG mode. Here's a short memo on how to do that. Note: T…| BioErrorLog Tech Blog (en)
This is a quick memo on how to retrieve all AWS service names (subcommands) provided via AWS CLI. Introduction How to List All Available Services in AWS CLI Method Example Conclusion References Introduction Sometimes you might want to list all the services you can use with AWS CLI, like aws ec2 or a…| BioErrorLog Tech Blog (en)
If you delete the chat where the image was generated, the corresponding image will also be deleted from the ChatGPT Library. Introduction How to Delete Images from ChatGPT Library Method Let’s Try It Conclusion Reference Introduction A new "Library" tab was recently added to ChatGPT. This tab shows …| BioErrorLog Tech Blog (en)
In this post, I’ll run a simple robot experiment on Raspberry Pi, combining a camera and servo motors with GPT-4 Vision. For Part 1, see: en.bioerrorlog.work Introduction Combining GPT-4 Vision with Raspberry Pi Concept Setup Hardware Software Results Conclusion References Introduction When I did ou…| BioErrorLog Tech Blog (en)
We'll conduct a simple experiment combining a camera, servo motors, and GPT on a Raspberry Pi. Introduction Combining GPT with Raspberry Pi, Camera, and Servo Motors Prototype Concept Setup Hardware Software Results Challenges Object Detection Token Usage Memory Retention Perceiving the World Conclu…| BioErrorLog Tech Blog (en)
We will create a shell command to quickly combine the contents of multiple files, including directory structure information, for LLM prompts. Introduction Shell Command to Concatenate Multiple Files for AI Coding Goal Command Implementation Examples Conclusion References Introduction When coding wit…| BioErrorLog Tech Blog (en)
This is a quick note on how to control multiple servo motors using only the GPIO pins on a Raspberry Pi—without relying on any PWM or servo controller modules. Introduction Controlling Multiple Servos on Raspberry Pi OS Environment Wiring the Circuit Writing a Script to Move the Servos Running the S…| BioErrorLog Tech Blog (en)
This is a memo on how to measure the number of lines in a source code repository. Introduction How to Count Lines of Source Code Count Lines with a Command Count Lines with Tools Conclusion References Introduction While reading source code, I sometimes wonder how many lines the entire repository has…| BioErrorLog Tech Blog (en)
It indicates in-place operations. Introduction Underscore "_" Suffix in PyTorch Function Names Meaning Example Conclusion References Introduction When working with PyTorch, you'll often see functions with a trailing underscore _ in their names. kaiming_normal_ add_ etc... I didn’t know what it meant…| BioErrorLog Tech Blog (en)
This is a quick note on how to change the log output level in Terraform. Introduction Outputting DEBUG-Level Logs in Terraform Setting Log Levels Separately for Terraform and Providers Appendix: Reading Terraform's Source Code Conclusion References Introduction When troubleshooting, logs are an impo…| BioErrorLog Tech Blog (en)
You can easily do this with awk: awk '!seen[$0]++' Introduction Remove Duplicate Lines with One Command Command Breakdown Example Conclusion Reference Introduction This is a quick note on how to remove duplicate lines and show each line only once using a command. Note: This article was translated fr…| BioErrorLog Tech Blog (en)
A quick overview of the Functional Options Pattern in Go. Introduction Functional Options Pattern in Go Conclusion References Introduction While using a Go-based library, I came across the Functional Options Pattern. Here's a brief note on what the Functional Options Pattern is in Go. Note: This art…| BioErrorLog Tech Blog (en)
This is a memo on how to implement an MCP server using Golang. Introduction Prerequisite: Is there an official Go MCP SDK? Implementing an MCP Server in Go The Target MCP Server Implementing the MCP server in Go Implementing the Tool Implementing the Resource Implementing the Prompt Testing the Serv…| BioErrorLog Tech Blog (en)
This is a quick memo on how to use the Rust-based Python package & project manager, "uv". Introduction How to Use uv Installing uv Listing uv Commands Creating a Python Project Creating a Virtual Environment Adding a Python Package Checking Installed Packages Running Python Code Conclusion Reference…| BioErrorLog Tech Blog (en)
This guide summarizes how to use the MCP CLI. Introduction How to Use MCP CLI Installing MCP CLI List of MCP CLI Commands How to Use mcp run How to Use mcp dev How to Use mcp install Conclusion References Introduction MCP CLI is a tool included in the MCP SDK that helps MCP server development. This …| BioErrorLog Tech Blog (en)
This is a quick guide on how to use "MCP Inspector," a browser-based test tool for MCP servers. Introduction How to Use MCP Inspector Preparation: Set Up a Minimal MCP Server Launching MCP Inspector Using MCP Inspector Conclusion References Introduction MCP Inspector is an official browser-based tes…| BioErrorLog Tech Blog (en)
Use MCP to let an LLM play Minesweeper. Introduction Playing Minesweeper via MCP Overview Starting the Minesweeper Server Building the MCP Server Connecting Claude Desktop with MCP Server Letting Claude Play Minesweeper Conclusion References Introduction The combination of MCP and games is exciting.…| BioErrorLog Tech Blog (en)
This is a quick note to connect Claude Desktop to an MCP (Model Context Protocol) server. Introduction How to Connect Claude Desktop to an MCP Server 1. Add MCP Server Information to the Config File 2. Restart Claude Desktop Conclusion References Introduction Since Claude Desktop is made by Anthropi…| BioErrorLog Tech Blog (en)
Learn about AI agent patterns and practices from Anthropic’s article "Building effective agents" and its follow-up video. Introduction Background: What Is an AI Agent? AI Agent Patterns Augmented LLM Workflow: Prompt chaining Workflow: Routing Workflow: Parallelization Workflow: Orchestrator-workers…| BioErrorLog Tech Blog (en)
In this post, we'll connect GPT / OpenAI API with MCP (Model Context Protocol), and learn how MCP works. Introduction Recap: What is MCP? Connecting GPT to an MCP Server Implementing the MCP Server Implementing the MCP Client Running the MCP Client and Server Conclusion References Introduction Since…| BioErrorLog Tech Blog (en)
Learn the basics of the Go-based game engine Ebitengine by implementing a Boids Flocking simulation. Introduction What is Ebitengine? What I built: Boids Flocking Implementing Boids Flocking Minimum setup: Hello, World! Directory structure Implementing Game Logic Implementing the Boids Flocking Logi…| BioErrorLog Tech Blog (en)
How to fix the issue where searching with grep the output of aws help doesn't work as expected? Introduction Why You Can't Grep AWS CLI Help Output Cause Solution Example Conclusion References Introduction When you try to grep or use sed on the output of aws help, like aws help | grep 'XXX', it does…| BioErrorLog Tech Blog (en)