Skip to content

Instantly share code, notes, and snippets.

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

eggplants

🏠
Working from home
View GitHub Profile
div.Layout-sidebar {
width: inherit !important;
}
name description
AENC オーディオの暗号化
APIC 付属する画像
ASPI オーディオシークポイントインデックス
CHAP チャプター
COMM コメント
COMR コマーシャルフレーム
CTOC 目次
ENCR 暗号化の手法の登録
EQU2 均一化 (2)
@eggplants
eggplants / create_list.py
Created March 30, 2024 12:34
List of name and description of mutagen (mutagen.readthedocs.io) ID3 frames
import csv
from mutagen.id3 import Frames
with open('mutagen_frames.csv', 'w', newline="") as csvfile:
c = csv.writer(csvfile)
writer = csv.DictWriter(csvfile, fieldnames=["name", "description"])
writer.writeheader()
for name, cls in sorted(Frames.items()):
writer.writerow({
@eggplants
eggplants / Seedfeeder.sparql
Last active March 24, 2024 22:05
Query Seedfeeder works
# https://commons-query.wikimedia.org/sparql?query=...
# accept: application/sparql-results+json
# cookie: wcqsOauth=fce1...
# https://www.wikidata.org/wiki/EntitySchema:E49
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX schema: <http://schema.org/>
PREFIX p: <http://www.wikidata.org/prop/>
PREFIX pq: <http://www.wikidata.org/prop/qualifier/>
PREFIX wikibase: <http://wikiba.se/ontology#>
@eggplants
eggplants / enable_jit_and_nogil_on_python_3130a5_with_pyenv.md
Last active March 23, 2024 17:21
Enable JIT and NOGIL on Python 3.13.0a5 with pyenv (--enable-experimental-jit / --disable-gil)

Enable JIT and NOGIL on Python 3.13.0a5 with pyenv

Environment

$ uname -vorm
6.5.0-25-generic #25-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb  7 14:58:39 UTC 2024 x86_64 GNU/Linux

$ lsb_release -a
No LSB modules are available.
@eggplants
eggplants / get_cw_logs.py
Last active March 8, 2024 10:26
cloudwatch logs から特定のログストリーム全取得。 https://qiita.com/ozzy3/items/fd79d07f42215298e38d を改変
"""
USAGE:
poetry init -n
poetry add boto3
poetry run python get_cw_logs.py -p <profile> <log_group> <log_stream>
"""
from __future__ import annotations
import argparse
import re
@eggplants
eggplants / get_aria_cmd_dlsite.py
Created March 6, 2024 17:15
DLsiteの分割ダウンロードが遅いのでAPIをみてaria2で落とす情報を収集
import requests
N = 5
WORK_ID = "RJ..."
JWT = "..."
SID = "..."
session = requests.session()
session.cookies.set("jwt", JWT, domain=".dlsite.com")
session.cookies.set("__DLsite_SID", SID, domain=".dlsite.com")
@eggplants
eggplants / get_haiku.rb
Last active January 7, 2024 20:45
全俳句データベース https://horicun.moo.jp/contents/haiku/ in Ruby
#!/usr/bin/env ruby
def get_haiku n
len = 17
# Ver 1:
# https://horicun.moo.jp/contents/haiku/random.html?number_search=1
hiragana = "あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをがぎぐげござじずぜぞだぢづでどばびぶべぼぱぴぷぺぽぁぃぅぇぉゃゅょゎっゐゑーゔん"
# Ver 2:
@eggplants
eggplants / arti_on_ubuntu.md
Last active December 29, 2023 14:30
Connect to `.onion` websites via SOCKS Proxy with Arti (version: 1.1.11)

How to connect to .onion websites via SOCKS Proxy with Arti

Environment

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 23.10
Release:        23.10
@eggplants
eggplants / install-apache-flex.sh
Last active December 1, 2023 17:57
Install Apache Flex 4.16.1 on Ubuntu 23.10
#!/usr/bin/env bash
set -euo pipefail
flex_home="$HOME/.flex"
if [[ -v FLEX_HOME && "$FLEX_HOME" != "$flex_home" ]]; then
echo '"$FLEX_HOME" (global) != "$flex_home": '"\"${FLEX_HOME}\" and \"${flex_home}\"" >& 2
exit 1
fi