Skip to content

Instantly share code, notes, and snippets.

View s2terminal's full-sized avatar

suzuki.sh s2terminal

View GitHub Profile
@s2terminal
s2terminal / README.md
Last active November 24, 2025 10:53
GitHub Copilotのコードレビュー用カスタムチャットモード

GitHub Copilot コードレビュー用カスタムエージェント

GitHub CopilotのVS CodeおよびCopilot CLIで利用できる、コードレビュー用カスタムエージェント。

  • s2terminal-reviewPlanner.agent.md
    • git diffなどの差分を受け取って、レビュー計画書を作成するエージェント
    • 推奨されるレビュー順番やファイルの依存関係を記録することで、人間が手動でコードレビューするときの負担を軽減する
  • s2terminal-reviewer.agent.md
    • コードレビュー対象を受け取って、実際にコードレビューを実施するエージェント
    • レビュー計画書があればそれに従ってレビューする。レビュー計画書が無くても差分を指示すればレビューできる
  • 修正の必要性の有無を問わず、すべての変更差分を確認してコメントをする
@s2terminal
s2terminal / setup.md
Last active January 27, 2022 08:21
Dockerで各言語のプロジェクトセットアップ

Dockerで各言語のプロジェクトセットアップ

Dockerで各言語の初期セットアップをするときのコマンド。これで作ったプロジェクトをもとにdocker-compose.ymlを記述したりしてつかう。

TypeScript + Next.js

$ docker run \
  --interactive --tty --rm \
  --volume $(pwd):/app \
 --workdir /app node:16-alpine \
@s2terminal
s2terminal / markdown.css
Last active December 12, 2021 12:55
VSCode workspace setting for text writing
body {
font-family: "YuMincho", "游明朝", "serif";
background-color: #fff;
color: #000;
}
@s2terminal
s2terminal / ordinalNumber.ts
Last active July 14, 2019 14:00
TypeScriptの型で順序数を定義して、1+2が3であることをプログラムを動かさずに型定義で示す
// http://www.typescriptlang.org/play/#code/PTAEHkCcBMEsDsCGAbUA5ArgWwEYFNJRo8AzBWAF1gHt4AoCgTwAc9QBJeAY0jyz3gUAPABUAfKAC8oANoiAugG4GLNuHhtpMpStagRAd2qgTUjt179BQ9XjHKmekQAtebM5x58Bww9Xu6bABi1BiEJtKelj6irnh2ynQgoADCtF4UbCQY3FS0dNm5NPCgzMgYAM62omIAFABuKABc+gCULVHe1uKgAN50JrwUYSUyjcg6AL50SWBpFniZoPDY+JB0XLQVFKC0eC22ZtrKm-DboBRGLX5mZZW2tXutiafnvBUYyDvSd1UatZdqM8NlsduMAILXIymaTvT4URSgZIAUUgkGo61eYJQACFrnFNKA4V8TqDQOMUi0QmEIkS8B8SUiwKj0esgA
// Ordinal Number definition
type Increment<T> = [T];
type One = [];
type Two = Increment<One>;
type Three = Increment<Two>;
type Four = Increment<Three>;
// Concrete function
@s2terminal
s2terminal / .gitlab-ci.yml
Created May 7, 2019 13:28
YARD documents on GitLab Pages
image: ruby:2.6.1-alpine
pages:
script:
- apk add --update --no-cache build-base libxml2-dev libxslt-dev libstdc++ tzdata mariadb-dev nodejs ca-certificates yarn
- bundle install --path vendor
- bundle exec yard
- rm -rf public
- mv doc public
artifacts:
@s2terminal
s2terminal / docker-compose.yml
Last active April 26, 2019 07:08
Growi on Azure Web App for Containers
# cf. https://github.com/weseek/growi-docker-compose/blob/master/docker-compose.yml
#
version: '3'
services:
growi:
image: weseek/growi:3.4.4
links:
mongo: mongo
depends_on:
@s2terminal
s2terminal / hatenablog_custom.css
Created January 2, 2018 07:13
はてなブログ用カスタムCSS
/* <system section="theme" selected="6653586347149180725"> */
@import url("http://hatenablog.com/theme/6653586347149180725.css");
/* </system> */
/* <system section="background" selected="undefined"> */
/* </system> */
/* custom css @s2terminal */
/* テーブル */
@s2terminal
s2terminal / Dockerfile
Last active November 28, 2017 00:06
textlinter
# run $> docker build . --tag textlinter
# run $> docker run --volume "$(pwd):/root" --rm textlinter /root/node_modules/.bin/textlint target.md
# cf. https://dev.classmethod.jp/devenv/atom-textlint-proofreading/
# cf. https://kuroeveryday.blogspot.jp/2017/07/running-nodejs-app-in-docker.html
FROM node:latest
ADD ./ /root
WORKDIR /root
RUN npm install --save-dev prh textlint textlint-rule-preset-ja-technical-writing textlint-rule-prh textlint-rule-spellcheck-tech-word
@s2terminal
s2terminal / purge.scpt
Created May 15, 2016 10:40
Macのメモリ解放用JXA(JavaScript for Automation)
var app = Application.currentApplication();
app.includeStandardAdditions = true;
app.doShellScript("sudo purge", {administratorPrivileges:true, withPrompt:"sudo purge"});
app.displayDialog("purged");
@s2terminal
s2terminal / request_azure_ml.rb
Created April 10, 2016 10:41
Azure Machine Learning Web サービス Ruby版コード
def request_azure_ml(request_uri, twitter_user_id, api_key)
uri = URI.parse(request_uri)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
req = Net::HTTP::Post.new(uri.request_uri)
req["Content-Type"] = 'application/json'
req["Authorization"] = 'Bearer ' + api_key
req.body = {