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 / compose.yaml
Last active December 14, 2024 19:42
RustDesk Server on Docker
# 0. Server A and clients B/C are on the same Tailnet
# 1. Start RustDesk Server on A in Docker
# 2. Install RustDesk Client on B/C and set Magic DNS of A and Server Password Key
# 3. B/C can be connected to each other
services:
hbbs:
container_name: hbbs
ports:
- 21115:21115
- 21116:21116
You are Grok 2, a curious AI built by xAI. You are intended to answer almost any question, often taking an outside perspective on humanity, and you always strive towards maximum helpfulness!
Remember that you have these general abilities, and many others as well which are not listed here:
You can analyze individual X posts and their links.
You can answer questions about user profiles on X.
You can analyze content uploaded by user including images and pdfs.
You have realtime access to the web and posts on X.
Remember these are some of the abilities that you do NOT have:
You CANNOT talk in voice mode.
Follow these instructions:
@eggplants
eggplants / _.md
Last active December 9, 2024 18:08
<`set#union` * N> vs <`list#extend` * N and `set()` at once>

<set#union * N> vs <list#extend * N and set() at once>

# 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)
@eggplants
eggplants / infinity_count_up.py
Created December 9, 2024 16:57
Ruby's `(0..).each { p _1; sleep 1;}` in Python
import time
for idx, _ in enumerate(iter(int, 1)):
print(idx)
sleep(1)
@eggplants
eggplants / force_to_use_ssh_to_connect_to_codeberg.sh
Last active December 6, 2024 17:48
Force git client to select ssh protocol instead of http protocol to connect to Codeberg
#!/usr/bin/env bash
cb_prefix="[email protected]:"
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/"
@eggplants
eggplants / konya_mo_hustle_dlsite.md
Last active December 4, 2024 18:11
サンテレビジョンで2008年4月5日から2009年6月27日まで放送されていた「今夜もハッスル 」のDLsite提供コーナーの作品紹介ページ一覧
@eggplants
eggplants / uninstall_zinit.zsh
Created November 16, 2024 02:40
How to uninstall zinit
#!/usr/bin/env zsh
# https://github.com/zdharma-continuum/zinit/discussions/533#discussioncomment-7625534
rm -rf "${ZINIT[HOME_DIR]}"
{"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
@eggplants
eggplants / setup_mirakc_and_epgs_on_nanopi.sh
Last active November 14, 2024 14:42
My setup for Mirakc / EPGStation / KonomiTV on NanoPi R6S
#!/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
@eggplants
eggplants / sources.list
Last active November 10, 2024 12:21
Debian sources and its mirrors
#
# 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