Skip to content

Instantly share code, notes, and snippets.

View amane-katagiri's full-sized avatar

Amane Katagiri amane-katagiri

View GitHub Profile
amane-katagiri /
Last active November 15, 2023 07:20
Emoji dictionary generator for ATOK.
#!/usr/bin/env python3
Generate emoji dict file for ATOK.
You can convert emoji_strategy.json on emoji-toolkit ( into:
Grinning 😀 名詞*
amane-katagiri /
Last active July 31, 2023 06:57
List all conversation lines from exported data of ChatGPT.
#!/usr/bin/env python3
# Usage: ./ conversations.json ./path/to/export/dir
from dataclasses import dataclass
import itertools
import json
import logging
from logging import getLogger, StreamHandler
import sys
amane-katagiri /
Last active July 22, 2023 18:01
A tiny script to print proofreading suggestions for your sentences with OpenAI API.
#!/bin/bash -eu
amane-katagiri / expose-wsl-server.ps1
Last active June 3, 2023 20:36
Expose server connection on WSL to LAN.
if ($args.count -eq 0){
$connectport = [Microsoft.VisualBasic.Interaction]::InputBox("Input connectport (expose port on wsl)", $MyInvocation.MyCommand.Name, "8000")
if ($connectport.length -eq 0) {
Write-Error "Set connectport" -ErrorAction Stop
$listenport = [Microsoft.VisualBasic.Interaction]::InputBox("Input listenport (expose port on host)", $MyInvocation.MyCommand.Name, $connectport)
if ($listenport.length -eq 0) {
Write-Error "Set listenport" -ErrorAction Stop
amane-katagiri / sample.atom.xml
Last active June 4, 2023 01:26
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="">
<!-- サイトのURL -->
<link rel="alternate" href=""></link>
<!-- フィードのURL -->
<link rel="self" href=""></link>
<!-- フィードのID「tag:【サイトドメイン】,【公開年(月日)】:【URL】」 -->
<!-- フィードの最終更新日時 -->
amane-katagiri /
Last active June 2, 2023 14:07
#!/usr/bin/env python3
# ##### つかいかた #####
# 実行前に `pip install feedgenerator` でライブラリをインストールしてください
# 例1: ./
# => サンプル入力からフィードを生成して標準出力に表示します
# 例2: ./ input.txt
# => input.txtの内容からフィードを生成して標準出力に表示します
amane-katagiri / message.txt
Created July 19, 2022 01:15
Last weekend’s Revue outage
Between 1:30pm ET on Friday, June 8, and around 6:15pm ET on Saturday, June 9, the Revue website was inaccessible.
We are sorry for the inconvenience this caused, and would like to explain what happened.
First off, some things to know:
Scheduled newsletter issues that were sent during the outage will have impacted delivery, but this incident will not affect future delivery
Analytics and aggregated data regarding your newsletters continued normally
The problem was caused by a Domain Name System (“DNS”) issue, which affected Revue between the hours stated above. The team worked hard to resolve the issue as swiftly as possible.
Once the issue was resolved, Revue came back online for a lot of people — but DNS changes can take up to 24 hours to propagate globally, which led to some people experiencing the outage for longer than others.
We sincerely apologize and we have taken the feedback you have shared into account. Our @TwitterWrite team will ensure that transparent, clear communication continues t
amane-katagiri / emoji_search.json
Created July 9, 2022 09:08
JSON file mapped from emoji alias to twemoji image (72x72 png).
":grinning:": "",
":smiley:": "",
":smile:": "",
":grin:": "",
":laughing:": "",
":satisfied:": "",
":sweat_smile:": "",
":joy:": "",
":rofl:": "",
amane-katagiri / tokyu-stations.csv
Last active June 18, 2022 17:47
えきめい 駅名
あおばだい 青葉台
あざみの あざみ野
いけがみ 池上
いけじりおおはし 池尻大橋
いしかわだい 石川台
いちがお 市が尾
うのき 鵜の木
えだ 江田
えばらなかのぶ 荏原中延
amane-katagiri / test-former.ics
Last active June 14, 2022 15:24
Complete/Corrupted iCalendar files, fetched from Proton Calendar. ( See )
PRODID:-//Proton AG//ProtonCalendar 1.0.0//EN
X-WR-CALNAME:corrupted calendar