Skip to content

Instantly share code, notes, and snippets.

View AndreiCherniaev's full-sized avatar

Andrei Cherniaev AndreiCherniaev

View GitHub Profile
@AndreiCherniaev
AndreiCherniaev / my AV1 century.md
Created July 24, 2025 04:45
How to keep media?

with rotation

Use -vf "transpose=2" 0 = 90° counterclockwise and vertical flip (default) 1 = 90° clockwise 2 = 90° counterclockwise 3 = 90° clockwise and vertical flip

find * -type f -name '*.MOV' -exec bash -c 'ffmpeg -y -i "$0" -c:v libaom-av1 -crf 30 -b:v 500k -vf "transpose=2" -map_metadata 0:s:0 -metadata language="ru" -metadata title="${0/.MOV}" -metadata creation_time="2015-06-26T00:00:00.000000Z" "${0/MOV/webm}"' {} \;

no rotation

# /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
@AndreiCherniaev
AndreiCherniaev / phoronix-cmd.md
Last active July 11, 2025 05:32 — forked from anshula/phoronix-cmd.md
Phoronix Test Suite Cheat Sheet
@AndreiCherniaev
AndreiCherniaev / autoinstall.yaml
Last active June 30, 2025 05:40
Ubuntu autoinstall configuration
#cloud-config
interactive-sections:
- identity
autoinstall:
interactive-sections:
- identity
apt:
disable_components: []
geoip: true
preserve_sources_list: false
@AndreiCherniaev
AndreiCherniaev / my_hexdump.txt
Last active June 2, 2025 04:37
hexdump per bytes for first 21 bytes only
hexdump -n21 -e '/1 " %02X"' -v filename.bin
@AndreiCherniaev
AndreiCherniaev / Linux kernel reboot.txt
Last active June 2, 2025 04:38
Ask kernel to rebooot
напрямую направить ядру запрос о перезагрузке устройства с помощью sysrq
#!/system/bin/sh
echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger
cmake_minimum_required(VERSION 3.16)
project(linklib_example LANGUAGES CXX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core )
@AndreiCherniaev
AndreiCherniaev / C union example.txt
Last active June 2, 2025 04:40
union uint8_16_t
typedef union{
uint16_t u16;
uint8_t u8s[2];
}uint8_16_t;
const uint8_16_t val= {.u8s={0xAA, 0xBB}};
@AndreiCherniaev
AndreiCherniaev / Integer promotion example.txt
Last active June 2, 2025 04:40
Integer promotion example
#include <iostream>
int main()
{
uint16_t ttt= (((uint16_t)0x00 & 0x7F)<<8 | (uint16_t)(int8_t)0xA7);
printf("%u", ttt);
return 0;
}