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 / _.md
Last active January 13, 2025 17:13
Use image in <summary> within <details>

click me

[![egg car with shadow](

@eggplants
eggplants / install_resizer.sh
Last active January 15, 2025 13:25
Install resizer from source
#!/usr/bin/env bash
git clone https://github.com/Cykooz/fast_image_resize --depth 1 --single-branch -b main
cargo install --path ./fast_image_resize/resizer
@eggplants
eggplants / install_latest_imagemagick.sh
Created January 12, 2025 23:04
Install ImageMagick 7 in Debian/Ubuntu
#!/usr/bin/env bash
sudo apt install libfuse2 -y
wget 'https://imagemagick.org/archive/binaries/magick'
sudo install -m 0755 magick /usr/local/bin/magick
@eggplants
eggplants / listFavoriteCircles.js
Created December 29, 2024 16:37
コミケWebカタログから表に貼る用のサークル一覧TSVを作る
// https://webcatalog-free.circle.ms/User/Favorites?page=1&orderBy=Space
// 曜日 - 配置 - サークル名
const haichiLocations = Array.from(document.querySelectorAll(`span[data-bind="text: HaichiStr"]`)).map(e=>`${e.innerText}`)
const circleNames = Array.from(document.querySelectorAll(`a[href^="/Circle/"]`)).flatMap(e=>`${e.innerText}` || [])
console.assert(haichiLocations.length == circleNames.length)
console.log(haichiLocations.map((s, index)=>`${s.replace(' ', '\t')}\t${circleNames[index]}`).join('\n'))
@eggplants
eggplants / compose.yaml
Last active May 6, 2025 11:45
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/tcp
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="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/"