Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# there are FFmpeg_fixing/build and FFmpeg_fixing/src folders
# $ cd FFmpeg_fixing/build/
# $ ../src/configure >> conflog.txt
# copy part of conflog.txt to demuxers.txt
# since (exclude) "Enabled demuxers:"
cd /home/a/Downloads/myGitHub/FFmpeg_fixing/ffmpeg_config/
rm -f new.txt
@AndreiCherniaev
AndreiCherniaev / elmsof_C99.h
Last active January 7, 2024 08:59
Возвращает количество элементов массива, а не размер в байтах как sizeof()
#define elmsof(arr) sizeof(arr)/sizeof(arr[0])
@AndreiCherniaev
AndreiCherniaev / safe_dd.sh
Last active October 6, 2023 11:16
safe dd check does usb drive size == 32GB and after dd .img
# never use this if you have 32 GB hard drive
# never use this if you mount 2 or more 32GB usb flash card in one time
varvar=`blockdev --getsize64 /dev/sda`
# 32GB == 30765219840
if [ $varvar -eq 30765219840 ]; then
dd if=disk.img of=/dev/sda bs=4M conv=fsync status=progress
fi
@AndreiCherniaev
AndreiCherniaev / CP1251_to_UTF8
Last active October 5, 2023 11:51
CP1251 to UTF-8
# Устанавливаем https://github.com/nijel/enca
sudo apt-get install enca
# Заходим в папку с исходниками
cd ПутьКПапкеСИсходниками
# Запустим скрипт перевода всего, что в русских кодировках (russian: KOI8-R CP1251 ISO-8859-5 IBM866 maccyr) в UTF-8.
find ./ -name "*.c" -o -name "*.h" -type f | while read file; do enca -L ru -x UTF-8 "$file"; done;
@AndreiCherniaev
AndreiCherniaev / gist:18cd6fa4c769c527bb5e177467226091
Created June 23, 2022 22:28
customize-image.sh with auto mount flash driver to /media/usb
#!/bin/bash
# this is part for armbian
# путь к этому файлу XunlongA/userpatches/customize-image.sh
# arguments: $RELEASE $LINUXFAMILY $BOARD $BUILD_DESKTOP
# This is the image customization script
# NOTE: It is copied to /tmp directory inside the image
# and executed there inside chroot environment
# so don't reference any files that are not already installed
@AndreiCherniaev
AndreiCherniaev / README.rst
Last active September 11, 2021 05:03 — forked from tkf/README.rst

https://live.staticflickr.com/65535/51444924253_7a5783b9cd_k.jpg