Skip to content

Instantly share code, notes, and snippets.

View eggplants's full-sized avatar
🏠
Working from home

haruna eggplants

🏠
Working from home
View GitHub Profile
@eggplants
eggplants / ch2pl.py
Created August 16, 2024 19:52
Convert mirakurun / mirakc json file of channels into m3u8 playlist file.
"""Convert mirakurun / mirakc json file of channels into m3u8 playlist file."""
from __future__ import annotations
import argparse
import json
import re
import sys
from pathlib import Path
from textwrap import dedent
@eggplants
eggplants / list_followees_gpg_key_hash.sh
Last active August 4, 2024 06:35
Get gpg key hash of GitHub followers / followees
#!/usr/bin/env bash
set -eu
requirements=(curl gh gpg grep sed tee)
if ! command -v "${requirements[@]}" &>/dev/null
then
echo "required: ${requirements[*]}" >&2
exit 1
fi
@eggplants
eggplants / proof.md
Last active August 30, 2024 16:17
This is my Keyoxide proof for GitHub
@eggplants
eggplants / generate_srt_from_video_translate.md
Last active August 3, 2024 15:34
Generate .srt file and translate into different language

Generate .srt file and translate into different language

Environment

$ uname -vorm
6.8.0-38-generic #38-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun  7 15:25:01 UTC 2024 x86_64 GNU/Linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
@eggplants
eggplants / my_homemaid_pc_20240605.md
Last active July 27, 2024 14:31
My homemaid PC (2024-06-05)
@eggplants
eggplants / swiftlint_todo.sh
Last active June 4, 2024 05:42
Write all errors once in disabled_rules in .swiftlint.yml / 既存プロジェクトにSwiftLintを導入するときに全てのエラーを一旦 .swiftlint.yml の disabled_rules に書く
#!/usr/bin/env bash
# In `Podfile`:
# ```
# # Linter / Formatter
# pod 'SwiftLint'
# ```
cat <<'A' > .swiftlint.yml
# Directory and file filters
@eggplants
eggplants / rtx830_transix_dslite.config
Last active May 29, 2024 20:25
ヤマハルーター (RTX830) でIPv4 over IPv6 (DS-Lite) をtransixで設定する
# ヤマハルーターでIPv4 over IPv6 (DS-Lite) をtransixで設定する
# 2024-05現在
# 検証環境: ルーター - RTX830, プロバイダー - IIJひかり IPoEオプション有り ひかり電話契約なし
# 参考:
# https://network.yamaha.com/setting/router_firewall/ipv6/ds-lite#non-contract
# クライアントから接続
# telnet 192.168.100.1
#!/usr/bin/env bash
# Epson Inkjet Printer Driver (ESC/P-R) for Linux
sudo apt install ./epson-inkjet-printer-escpr_*_amd64.deb
# also
sudo apt install printer-driver-escpr psutils cups
#!/usr/bin/env bash
echo 'https://github.com/eggplants/ubuntu-setup.sh'