Skip to content

Instantly share code, notes, and snippets.

View AndreiCherniaev's full-sized avatar

Andrei Cherniaev AndreiCherniaev

View GitHub Profile
<!DOCTYPE html>
<html itemscope itemtype="https://schema.org/QAPage" class="html__responsive " lang="en">
<head>
<title>buildroot - How can I make the &#39;en_US&#39; locale by default? - Stack Overflow</title>
<link rel="shortcut icon" href="https://stackoverflow.com/Content/Sites/stackoverflow/Img/favicon.ico?v=ec617d715196">
# Manual https://canonical-subiquity.readthedocs-hosted.com/en/latest/reference/autoinstall-reference.html
autoinstall:
version: 1
refresh-installer:
update: true
channel: 26.04/edge
updates: all
identity:
hostname: ubuntu-desktop
password: '$6$TThZwH2sYnfxdzIN$COsmkwowJBH.pYW/jpfhzcBsxSQ6.lrEygIGUQLDrJBsTBgT1gLnkspvttBmgKIJl6UGGSOv4cDfV4Hj0BqS9/'
@AndreiCherniaev
AndreiCherniaev / HGST_ubuntu-deployment.yaml
Last active December 10, 2025 09:05
For HGST proj ubuntu deployment
# Manual https://canonical-subiquity.readthedocs-hosted.com/en/latest/reference/autoinstall-reference.html
autoinstall:
version: 1
refresh-installer:
update: true
channel: 26.04/edge
updates: all
identity:
hostname: ubuntu-desktop
password: '$6$TThZwH2sYnfxdzIN$COsmkwowJBH.pYW/jpfhzcBsxSQ6.lrEygIGUQLDrJBsTBgT1gLnkspvttBmgKIJl6UGGSOv4cDfV4Hj0BqS9/'
@AndreiCherniaev
AndreiCherniaev / rustdesk_deb_upd.sh
Last active December 9, 2025 09:02
Update rustdesk in Debian/Ubuntu
# Replace _64 to aarch64 or armv7 depends of your arch (use `dpkg --print-architecture` to detect)
P=$(curl -sS "https://github.com/rustdesk/rustdesk/releases" | grep -o 'https:[^"]*.deb' | grep '\/rustdesk-[0-9]*[0-9]\.[0-9].*_64.deb' | sort -r -n | head -1)
curl -sSOL --output-dir '/tmp' "$P"
sudo dpkg --install "/tmp/$(basename $P)"
sudo apt --fix-broken install
@AndreiCherniaev
AndreiCherniaev / docx_pptx_grep
Created September 16, 2025 02:12
Command-line tool to search docx files
# https://unix.stackexchange.com/a/743302/481341
docx_pptx_grep() {
keyword="$1"
/usr/bin/fdfind -t f -e docx -e pptx . | while read -r arg; do
if unzip -p "$arg" 2>/dev/null | rg -q --ignore-case --fixed-strings "$keyword"; then
echo "$arg"
fi
done
}
@AndreiCherniaev
AndreiCherniaev / Cher0_1_ubuntu-deployment.yaml
Last active December 8, 2025 07:07
YAML configuration files for Ubuntu installer
# Manual https://canonical-subiquity.readthedocs-hosted.com/en/latest/reference/autoinstall-reference.html
autoinstall:
version: 1
refresh-installer:
update: true
channel: latest/edge
updates: all
identity:
hostname: ubuntu-desktop
password: '$6$TThZwH2sYnfxdzIN$COsmkwowJBH.pYW/jpfhzcBsxSQ6.lrEygIGUQLDrJBsTBgT1gLnkspvttBmgKIJl6UGGSOv4cDfV4Hj0BqS9/'
@AndreiCherniaev
AndreiCherniaev / VM_alias_install.sh
Last active December 10, 2025 11:33
[Debian] install must-have aliases for virtual machine
echo "alias upd='sudo apt-get -o Acquire::Check-Valid-Until=false -o Acquire::Check-Date=false update && sudo apt upgrade -y && sudo apt autoremove -y'" >> "$HOME/.bash_aliases"
echo "alias t='sudo apt-get -o Acquire::Check-Valid-Until=false -o Acquire::Check-Date=false update && sudo apt autoremove -y'" >> "$HOME/.bash_aliases"
echo "alias untar='tar -x --use-compress-program=rapidgzip -f'" >> "$HOME/.bash_aliases"
alias lowpwr='sudo cpupower frequency-set -g powersave' >> "$HOME/.bash_aliases"
@AndreiCherniaev
AndreiCherniaev / my AV1 century.md
Last active November 27, 2025 05:19
How to keep media?

video

MOV to slideshow

Make slideshow based on MOV. '-c:v copy' is used to took images as is. You can avoid this option to get low-qualite (low size) jpg...

fdfind -e MOV -e mov -tf --maxdepth 1 -x bash -c 'mkdir "${0}Photo" && ffmpeg -y -i ${0} -c:v copy ${0}Photo/output_%04d.jpg'

mp4 to slideshow

Make slideshow based on mp4. You can use for all simiar formats like mkv, webm, ...

fdfind -e mp4 -tf --maxdepth 1 -x bash -c 'mkdir "${0}Photo" && ffmpeg -y -i ${0} ${0}Photo/output_%04d.jpg'
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/nvme1n1p1 during curtin installation
/dev/disk/by-uuid/653a2212-f324-4b5f-bd9f-01f590dcf876 / btrfs defaults 0 1
# /boot/efi was on /dev/nvme1n1p2 during curtin installation
@AndreiCherniaev
AndreiCherniaev / phoronix-cmd.md
Created July 11, 2025 05:35 — forked from danielgomezrico/phoronix-cmd.md
Phoronix Test Suite Cheat Sheet