This file contains hidden or 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 python3 | |
import asyncio | |
import argparse | |
from aioslsk.client import SoulSeekClient | |
from aioslsk.settings import Settings, CredentialsSettings | |
from aioslsk.events import SearchRequestReceivedEvent, SearchRequestSentEvent | |
async def main(): | |
ap = argparse.ArgumentParser(description="Dump distributed search requests (Soulseek)") | |
ap.add_argument("-u", "--username", required=True) |
This file contains hidden or 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 | |
set -euo pipefail | |
shopt -s nullglob | |
for f in *.wav; do | |
echo "[*] $f" | |
sox --clobber "$f" -C 48 -r 8000 -c 1 "${f%.wav}.mp3" \ | |
highpass 300 lowpass 3400 \ | |
compand 0.02,0.20 6:-80,-60,-40,-30,-20 -6 -90 0.2 \ | |
gain -n -1 dither -s |
This file contains hidden or 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 -S uv run -s | |
# /// script | |
# requires-python = ">=3.11" | |
# dependencies = [ | |
# "aiolimiter", | |
# "httpx", | |
# "ipython", | |
# "tqdm", | |
# ] | |
# /// |
This file contains hidden or 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 -S uv run -s | |
# /// script | |
# requires-python = ">=3.12" | |
# dependencies = [ | |
# "pillow", | |
# ] | |
# /// | |
import argparse | |
import struct | |
from pathlib import Path |
This file contains hidden or 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 -S uv run -s | |
# /// script | |
# requires-python = ">=3.11" | |
# dependencies = [] | |
# /// | |
import argparse | |
import os | |
import subprocess | |
import shutil |
This file contains hidden or 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 | |
# 1. Search for text in files using Ripgrep | |
# 2. Interactively narrow down the list using fzf | |
# 3. Open the file in Vim | |
rg --color=always --line-number --no-heading --smart-case -t txt "${*:-}" | | |
fzf --ansi \ | |
--color "hl:-1:underline,hl+:-1:underline:reverse" \ | |
--delimiter : \ | |
--preview 'bat --color=always {1} --highlight-line {2}' \ |
This file contains hidden or 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
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v5.json", | |
"height": "container", | |
"data": { | |
"url": "https://fullfatsearch.fly.dev/youtube.csv?sql=select%0D%0A++v.upload_date%2C%0D%0A++SUM%28%0D%0A++++%28LENGTH%28s.text%29+-+LENGTH%28REPLACE%28s.text%2C+%3Asearch%2C+%27%27%29%29%29+%2F+LENGTH%28%3Asearch%29%0D%0A++%29+AS+boludo%2C%0D%0A++s.video_id%2C%0D%0A++s.video_title%2C%0D%0A++v.video_url%0D%0Afrom%0D%0A++subtitles_with_videos+s%0D%0A++join+videos+v+on+s.video_id+%3D+v.video_id%0D%0Awhere%0D%0A++subtitle_id+in+%28%0D%0A++++select%0D%0A++++++rowid%0D%0A++++from%0D%0A++++++subtitles_fts%0D%0A++++where%0D%0A++++++subtitles_fts+match+%3Asearch%0D%0A++%29%0D%0Agroup+by%0D%0A++s.video_id%2C%0D%0A++s.video_title%2C%0D%0A++v.video_url%0D%0Aorder+by%0D%0A++v.upload_date+asc&search=boludo", | |
"format": { | |
"type": "csv" | |
} | |
}, | |
"mark": { |
This file contains hidden or 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
#!/bin/bash | |
# battery monitor systemd suspend/resume hook | |
LOGFILE="/var/log/battery.csv" | |
KERNEL=$(uname -r) | |
BIOS=$(dmidecode -s bios-version) | |
log() { | |
cd /sys/class/power_supply |
This file contains hidden or 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 | |
export PATH="$PATH:/usr/local/bin:/usr/bin" | |
set -e | |
# Token address | |
TOKEN="A6rSPi9JmJgVkW6BatsA6MjFYLseizPM2Fnt92coFjf4" | |
CHAIN="solana" | |
DEX="raydium" | |
EMOJI="🦎" |
This file contains hidden or 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
# /// script | |
# requires-python = ">=3.12" | |
# dependencies = [ | |
# "aiofiles", | |
# "httpx", | |
# "tqdm", | |
# ] | |
# /// | |
import sys | |
import json |
NewerOlder