Skip to content

Instantly share code, notes, and snippets.


Amane Katagiri amane-katagiri

View GitHub Profile
amane-katagiri / expose-wsl-server.ps1
Last active June 3, 2023 20:36
Expose server connection on WSL to LAN.
View expose-wsl-server.ps1
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
View sample.atom.xml
<?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
View message.txt
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).
View emoji_search.json
":grinning:": "",
":smiley:": "",
":smile:": "",
":grin:": "",
":laughing:": "",
":satisfied:": "",
":sweat_smile:": "",
":joy:": "",
":rofl:": "",
amane-katagiri / tokyu-stations.csv
Last active June 18, 2022 17:47
View tokyu-stations.csv
えきめい 駅名
あおばだい 青葉台
あざみの あざみ野
いけがみ 池上
いけじりおおはし 池尻大橋
いしかわだい 石川台
いちがお 市が尾
うのき 鵜の木
えだ 江田
えばらなかのぶ 荏原中延
amane-katagiri / test-former.ics
Last active June 14, 2022 15:24
Complete/Corrupted iCalendar files, fetched from Proton Calendar. ( See )
View test-former.ics
PRODID:-//Proton AG//ProtonCalendar 1.0.0//EN
X-WR-CALNAME:corrupted calendar
amane-katagiri /
Last active June 26, 2022 08:43
Single binary HTTP server written in Go embedded with all static files.
#!/bin/bash -ue
if [ "$#" -lt 3 ]; then
exit 1
export GOVER=1.18
export SUGOI_SRC=''
export PREFIX="$1"
amane-katagiri / remove-RG60289.txt
Last active December 22, 2021 01:28
みんなで翻訳(ミンナデホンヤク)RG60289 を新着作品一覧から取り除くブックマークレットです。
View remove-RG60289.txt
javascript:(function(){Array.from(document.querySelectorAll('.maker_name a')).filter(function(x){return x.href.endsWith('RG60289.html')}).map(function(x){x.closest('.n_worklist_item').remove()})})();
amane-katagiri /
Last active September 27, 2021 17:58
busybox crond と non-root cronfile

/* この記事は、ライフ 人間と科学シリーズ(Plume)の閉鎖処理の一環として、投稿した情報の整理を行うために書かれた。 */

busybox crondでは、root所有ではないcronfileを黙ってスキップしてしまうらしい: dockerでBusyBox crondが動かない – numa blog

通常のcrondならエラーが出るっぽい: /etc/cron.dへ置くファイルにはownerとpermissionに制約があるっぽい - モヒカンメモ

$ echo '0 0 * * * root true' > root
$ docker run --rm -v $(pwd)/root:/etc/crontabs/root --init alpine timeout 3 \
  sh -c 'mount | grep /etc/crontabs/root; \