# Python 3.13.0
$ python -c 'from datetime import datetime
prev = datetime.now()
a = set()
for i in range(n := 5000):
r = range(i * n, (i + 1) * n)
a |= set(j for j in r)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
for idx, _ in enumerate(iter(int, 1)): | |
print(idx) | |
sleep(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cb_prefix="url.git@codeberg.org:" | |
git config --global --remove-section "$gb_prefix" || : | |
git config --global "$cb_prefix".pushInsteadOf "git://codeberg.org/" | |
git config --global --add "$cb_prefix".pushInsteadOf "https://codeberg.org/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# https://github.com/zdharma-continuum/zinit/discussions/533#discussioncomment-7625534 | |
rm -rf "${ZINIT[HOME_DIR]}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"openapi":"3.0.1","info":{"version":"2.10.0","title":"epgstation","license":{"name":"MIT","url":"https://github.com/l3tnun/EPGStation/blob/master/LICENSE"}},"servers":[{"url":"http://localhost:8888/api"}],"paths":{"/videos/upload":{"parameters":[],"post":{"summary":"アップロードしたビデオファイルを追加","tags":["videos"],"description":"アップロードしたビデオファイルを追加する","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UploadVideoFileOption"}}}},"responses":{"200":{"description":"アップロードしたビデオファイルを追加しました"},"default":{"description":"予期しないエラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/version":{"parameters":[],"get":{"summary":"バージョン情報取得","tags":["version"],"description":"バージョン情報を取得する","responses":{"200":{"description":"バージョン情報を取得しました","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Version"}}}},"default":{"description":"予期しないエラー","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/thumbnails/cleanup":{"par |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Updated at: 2024-11 | |
# Environment: | |
# - Machine: NanoPi R6S | |
# - Tuner: | |
# - PX-M1UR (/dev/pxm1urvideo0) | |
# - PX-W3U4 (/dev/px4video{0..3}) | |
# - Card reader: SCR3310 v2.0 | |
# - OS: rk3588-sd-debian-bullseye-core-5.10-arm64-20230909.img |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# japanese mirror (bookworm): <http://ftp.tsukuba.wide.ad.jp/debian> | |
# | |
deb http://ftp.tsukuba.wide.ad.jp/debian bookworm main contrib non-free non-free-firmware | |
deb-src http://ftp.tsukuba.wide.ad.jp/debian bookworm main contrib non-free non-free-firmware | |
deb http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware | |
deb-src http://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware | |
deb http://ftp.tsukuba.wide.ad.jp/debian bookworm-updates main contrib non-free non-free-firmware |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# === | |
# > master node & agent node(s) | |
# === | |
sudo apt update -y && sudo apt upgrade -y | |
sudo systemctl stop dphys-swapfile | |
sudo systemctl disable dphys-swapfile | |
sudo rm -f /var/swap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# get your tailnet name with jq: | |
tailscale status --json | jq -r '.MagicDNSSuffix' | |
# or, without jq: | |
tailscale status --json | grep -m1 MagicDNSSuffix | cut -f4 -d'"' |
NewerOlder