Skip to content

Instantly share code, notes, and snippets.

View masahide's full-sized avatar

YAMASAKI Masahide masahide

View GitHub Profile
@laiso
laiso / blog.md
Last active April 19, 2025 16:03
【MCP】複数サーバーをまとめて管理するクライアント開発のベストプラクティス(Deep research with o1 pro mode)

以下は、複数のMCPサーバーに接続するクライアント側プログラムの開発方法についてまとめたブログ記事です。MCPクライアントの自作経験はあるものの、より実践的なTIPSや設計ノウハウを知りたい開発者向けの内容になっています。


【MCP】複数サーバーをまとめて管理するクライアント開発のベストプラクティス

はじめに

Model Context Protocol(MCP)は、LLM(Large Language Model)やAIツールとのやり取りを標準化するプロトコルとして進化を続けています。現在は STDIO 経由での利用が中心ですが、今後はネットワーク越しのリモート呼び出しが増えることが ロードマップ に示唆されています。

@jriquelme
jriquelme / elastic_sample.go
Created November 29, 2019 15:14
Signing of Elastic requests (https://github.com/elastic/go-elasticsearch) according to AWS v4 Signing process
cfg, err := external.LoadDefaultAWSConfig()
if err != nil {
panic(err)
}
esCfg := elasticsearch.Config{
Transport: &awssigner.V4Signer{
RoundTripper: http.DefaultTransport,
Credentials: cfg.Credentials,
Region: cfg.Region,
},
@debedb
debedb / WrappedStreamingBody
Last active July 1, 2025 17:33
Wrap boto3's StreamingBody object to provide enough Python fileobj functionality fileobj functionality so that GzipFile is satisfied.
class WrappedStreamingBody:
"""
Wrap boto3's StreamingBody object to provide enough
fileobj functionality so that GzipFile is
satisfied. Sometimes duck typing is awesome.
@ninnemana
ninnemana / ganalytics.go
Created February 3, 2015 15:14
Example of routing analytics using the Measurement Protocol in golang
package main
import (
"net/http"
"net/url"
)
func main() {
vals := make(url.Values, 0)
@sonots
sonots / fluentd_hacking_guide.md
Last active October 4, 2024 00:01
Fluentd ソースコード完全解説 (v0.10向け)

Fluentd ソースコード完全解説

英題:Fluentd Hacking Guide

目次

30分しかないため斜線部分は今回省く

  • Fluentd の起動シーケンスとプラグインの読み込み
  • Fluentd の設定ファイルのパース
  • Input Plugin から Output Plugin にデータが渡る流れ
@sudix
sudix / bounded.go
Created April 2, 2014 07:13
Bounded parallelism [Go Concurrency Patterns: Pipelines and cancellation - The Go Blog](http://blog.golang.org/pipelines)
package main
import (
"crypto/md5"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"sort"
@benbjohnson
benbjohnson / gist:8338908
Created January 9, 2014 18:03
Cross Compile w/ drone.io
# This is what I have so far. The Go 1.2 installation doesn't seem to be correct so it's still breaking.
rm -rf /usr/local/go/src/pkg/appengine
rm -rf /usr/local/go/src/pkg/appengine_internal
rm /usr/local/go/src/pkg/os/error_posix.go
wget -O golang-crosscompile-master.zip https://github.com/davecheney/golang-crosscompile/archive/master.zip
unzip golang-crosscompile-master.zip
source golang-crosscompile-master/crosscompile.bash
go-crosscompile-build darwin/amd64
@shirou
shirou / ssh_keyscan.yml
Last active March 6, 2025 06:47
run ssh-keyscan to add keys to known_hosts. This is a playbook for ansible
---
- hosts: all
gather_facts: no
sudo: no
tasks:
- name: run ssh-keyscan to add keys to known_hosts
local_action: shell ssh-keyscan {{ ansible_ssh_host }} >> ~/.ssh/known_hosts
@voluntas
voluntas / shiguredo_tech.rst
Last active May 13, 2025 02:58
時雨堂を支える技術

時雨堂を支える技術

日時:2025-05-13
作:時雨堂
バージョン:2025.3
URL:https://shiguredo.jp/

言語

@shirou
shirou / site.yml
Created August 19, 2013 08:46
Ansible-awx site.yml
---
# This playbook deploys the AWX application (database, web and worker) to a
# single server.
- hosts: all
tasks:
- name: group hosts by distribution
group_by: key="{{ ansible_distribution }}-{{ ansible_distribution_version }}"
- hosts: RHEL-6*:CentOS-6*:SL-6*