Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set +e
CURRENT_HOSTNAME=`cat /etc/hostname | tr -d " \t\n\r"`
if [ -f /usr/lib/raspberrypi-sys-mods/imager_custom ]; then
/usr/lib/raspberrypi-sys-mods/imager_custom set_hostname raspberry-pi-os
else
echo raspberry-pi-os >/etc/hostname
sed -i "s/127.0.1.1.*$CURRENT_HOSTNAME/127.0.1.1\traspberry-pi-os/g" /etc/hosts
Creative Commons Legal Code
CC0 1.0 Universal
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
set -g default-terminal "tmux-256color"
set -g status-fg "#f8fafc"
set -g status-bg "#000000"
set -g status-style "fg=#f8fafc,bg=#000000"
set -g window-status-style "fg=#808080"
set -g window-status-current-style "fg=#22c55e"
set -g pane-border-style fg="#1A1A1A"
set -g pane-active-border-style "fg=#1A1A1A"
set -g message-style "fg=#000000,bg=#22c55e"
set -g copy-mode-match-style "fg=#1A1A1A,bg=#e2e8f0"
[colors.primary]
background = "0x000000"
foreground = "0xf8fafc"
[colors.normal]
black = "0x1A1A1A"
red = "0xff0000"
green = "0x22c55e"
yellow = "0xfde047"
blue = "0x0000ff"
[theme/Vanta]
opacity_back = 100
satellite_show = never
satellite_pos = topleft
satellite_size = small
control_margin = 3
textbox_padding = 3
listitem_padding = 1
layout = list_selmark,list_icon
color_background = #000000
[theme/Fakenight]
opacity_back = 100
satellite_show = never
satellite_pos = topleft
satellite_size = small
control_margin = 3
textbox_padding = 3
listitem_padding = 1
layout = list_selmark,list_icon
color_background = #2b2e34
<key name="Colors" modified="2025-06-23 13:05:13" build="171109">
<key name="Palette1" modified="2025-06-23 13:05:13" build="171109">
<value name="Name" type="string" data="Vanta"/>
<value name="ExtendColors" type="hex" data="00"/>
<value name="ExtendColorIdx" type="hex" data="10"/>
<value name="TextColorIdx" type="hex" data="10"/>
<value name="BackColorIdx" type="hex" data="10"/>
<value name="PopTextColorIdx" type="hex" data="10"/>
<value name="PopBackColorIdx" type="hex" data="10"/>
<value name="ColorTable00" type="dword" data="00000000"/>
<key name="Colors" modified="2024-08-04 00:48:28" build="230724">
<key name="Palette1" modified="2024-08-04 00:48:28" build="230724">
<value name="Name" type="string" data="FakeNight"/>
<value name="ExtendColors" type="hex" data="00"/>
<value name="ExtendColorIdx" type="hex" data="0e"/>
<value name="TextColorIdx" type="hex" data="10"/>
<value name="BackColorIdx" type="hex" data="10"/>
<value name="PopTextColorIdx" type="hex" data="10"/>
<value name="PopBackColorIdx" type="hex" data="10"/>
<value name="ColorTable00" type="dword" data="0015161e"/>
# Write by GPT-4o mini👨‍💻, scillidan🤡
# Purpose: Convert text phrases from a list into audio files using Kokoro TTS.
# Usage: file.bat <list.txt>
import sys
import os
import subprocess
import shutil
import re
# Write by GPT-4o mini👨‍💻, scillidan🤡
# Purpose: Generate a timepoint list as text file format from audio files or a directory.
# It can be used to write timepoint list on video platform. And I used it for https://github.com/dyphire/mpv-scripts/blob/main/chapter-make-read.lua.
# Tools: python, ffprobe
# Usage: python file.bat -i <file_1> <file_2> [-o <output>]
import os
import subprocess
import argparse