ide-chat-prettier を使うと、AIエディタのチャットをエクスポートした内容を見やすくしてくれます。 Visual Studio Code の Copilot、Cursor に対応しています。
具体的に、ユーザとAIの一回の対話を details summary でまとめてくれます。 これによってとても長く続くチャットセッション
const MAPBOX_ACCESS_TOKEN = 'ご自身の Mapbox API Key' | |
// Mapbox フォワードジオコーディング API 各種の結果を比較 | |
// Search v1 API | |
// https://docs.mapbox.com/api/search/search/ | |
async function mapboxSearchV1ForwardGeocoding(address) { | |
const url = `https://api.mapbox.com/search/v1/forward/${encodeURIComponent(address)}?access_token=${MAPBOX_ACCESS_TOKEN}&language=ja&country=JP&limit=1` | |
const res = await fetch(url) | |
const json = await res.json() |
@xtetsuji ➜ /workspaces/codespaces-blank $ php tick_test.php | |
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9003 (through xdebug.client_host/xdebug.client_port). | |
Executing /workspaces/codespaces-blank/tick_test.php on line 9 | |
Hello | |
Executing /workspaces/codespaces-blank/tick_test.php on line 12 | |
Executing /workspaces/codespaces-blank/tick_test.php on line 13 | |
Executing /workspaces/codespaces-blank/tick_test.php on line 14 | |
Result: 10 | |
Executing /workspaces/codespaces-blank/tick_test.php on line 15 |
#!/bin/bash | |
set -eu | |
PRESET="PresetAppleM4V1080pHD" | |
function usage { | |
# local error_code=${1:-0} | |
cat <<EOF | |
Usage: | |
mov2mp4.sh input.mov |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use feature qw(say postderef); | |
use Data::Dumper; | |
my $table_col_separator = " | "; | |
my $table_first_row_separator = "| "; | |
my $table_last_row_separator = " |"; |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use feature qw(say); | |
use utf8; | |
binmode STDOUT, ':utf8'; | |
use Encode; | |
# 都道府県の漢字表記を北海道から沖縄県まで | |
my @prefs = ( |
mailq-list.pl is Postfix mailq viewer.
Normal Postfix mailq command shows only envelope information.
If you want to know header information, you run postcat
command every each time.
maiq-list.pl supports that you can show all queues' header information.
perl -MMath::BigInt -E 'say Math::BigInt->new("1209")->bpow("2023")->to_base(10) =~ s/(?<=\d)(?=(?:\d\d\d)+(?!\d))/,/gr =~ s/((?:\d\d\d,){10})/$1\n/gr'| |
#!/bin/bash | |
set -eu | |
gh api /user | jq -r '"\(.id)+\(.login)@users.noreply.github.com"' |
#!/bin/bash | |
# https://docs.docker.com/engine/install/ubuntu/ | |
set -eu | |
# root でなかったら終了 | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root." 1>&2 | |
exit 1 | |
fi |