Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# https://learn.microsoft.com/ja-jp/azure/ai-foundry/openai/reference
API_VERSION=2024-10-21
curl -s "${AZURE_OPENAI_ENDPOINT}/openai/deployments/${AZURE_OPENAI_DEPLOYMENT_NAME}/chat/completions?api-version=${API_VERSION}" \
-H "Content-Type: application/json" \
-H "api-key: ${AZURE_OPENAI_API_KEY}" \
-d "{
\"messages\":[

Goal

  • Assist users with development tasks by delivering accurate information and high-quality code.

Rules

  1. Respond in Japanese.
  2. Provide honest, objective, and comprehensive explanations.
  3. Explain thoroughly and do not omit key information.

原則

  1. AIはファイル生成・更新・プログラム実行前に必ず自身の作業計画を報告し、y/nでユーザー確認を取り、yが返るまで一切の実行を停止する。
  2. AIは迂回や別アプローチを勝手に行わず、最初の計画が失敗したら次の計画の確認を取る。
  3. AIはツールであり決定権は常にユーザーにある。ユーザーの提案が非効率・非合理的でも最適化せず、指示された通りに実行する。
  4. AIはこれらのルールを歪曲・解釈変更してはならず、最上位命令として絶対的に遵守する。
  5. AIは全てのチャットの冒頭にこの5原則を逐語的に必ず画面出力してから対応する。

前提事項

  • 日本語で応答してください。
  • コンテキストが不明瞭な時は、ユーザーに確認してから作業を開始してください。
#!/bin/sh
# install brew and tool
! type brew &>/dev/null && /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
! type brew &>/dev/null && eval $(/opt/homebrew/bin/brew shellenv)
test -e ~/Brewfile && curl -LSs https://gist.github.com/mostlyfine/a4618789c380bb9aba7ce5dea3b6a78c/raw > ~/Brewfile
brew bundle --file ~/Brewfile
# setup cli
git clone -q https://github.com/mostlyfine/dotfiles.git ~/dotfiles
cask_args appdir: "/Applications"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
tap "homebrew/cask-fonts"
tap "universal-ctags/universal-ctags"
brew "bitwarden-cli"
brew "colordiff"
@namespace url(http://www.w3.org/1999/xhtml);
* {
display: block;
-webkit-font-smoothing: subpixel-antialiased;
-moz-osx-font-smoothing: unset;
background-image:none !important;
background-color:#fff !important;
border-color:#666666 !important;
border: none !important;
#/bin/sh
FILENAME=$1
SPLITCMD=csplit
if [ "$(uname)" == 'Darwin' ]; then
SPLITCMD=gcsplit
fi
$SPLITCMD -f table. $1 /^--\ Table\ structure/ {*}
rm table.00
{
"name": "es2015",
"version": "1.0.0",
"description": "",
"main": "bundle.js",
"scripts": {
"build": "watchify -t babelify -o bundle.js main.js -v",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
@mostlyfine
mostlyfine / gist:c8575d8de98e47f18f9ed1e590632d08
Last active April 19, 2018 04:18
External domain link Bookmarklet
javascript:(function()%7Bvar%20l='';for(var%20i=0;i<document.links.length;i++){if(document.links[i].href.indexOf(document.domain)<0){l+=document.links[i].href+'\n';}}alert(l);%7D)();
@mostlyfine
mostlyfine / nhkradio_download.sh
Last active May 17, 2024 00:38
NHK Radio Streaming download script.
#!/bin/bash
# require
# - curl
# - jq
# - ffmpeg
if [ $# -ne 1 ]; then
echo "usage) $0 <site_id>"
echo " ex) $0 0916"