Skip to content

Instantly share code, notes, and snippets.

View zeionara's full-sized avatar
🥮
hey you want some brownies bitch?

dima zeionara

🥮
hey you want some brownies bitch?
View GitHub Profile
@zeionara
zeionara / mv-docker-cache.sh
Created January 11, 2026 08:40 — forked from Ujjwal0501/mv-docker-cache.sh
Change the default docker cache directory from /var/lib/docker to /home/docker-data
#!/bin/bash
set -e
FILE_PATH="/etc/docker/daemon.json"
# do not write if daemon.json already exists
if [ -e "$FILE_PATH" ]; then
echo "File ($FILE_PATH) already present. No changes made"
exit 1
@zeionara
zeionara / VHS85 (2023).srt
Created November 21, 2025 23:23 — forked from Alhadis/The Secret Agent (2025).srt
V/H/S/85 (2023) — Corrected subtitles
1
00:00:46,413 --> 00:00:49,724
[static crackling]
2
00:00:50,586 --> 00:00:53,275
Holy cow!
3
00:00:53,379 --> 00:00:55,896
@zeionara
zeionara / VHS85 (2023).srt
Created November 21, 2025 23:23 — forked from Alhadis/The Secret Agent (2025).srt
V/H/S/85 (2023) — Corrected subtitles
1
00:00:46,413 --> 00:00:49,724
[static crackling]
2
00:00:50,586 --> 00:00:53,275
Holy cow!
3
00:00:53,379 --> 00:00:55,896
@zeionara
zeionara / extract-zip-with-long-filenames.py
Last active September 23, 2025 09:45
Extract zip with long filenames of json files
import zipfile
import os
import sys
from json import loads, dumps
def safe_filename(name, max_len=100):
"""Truncate or hash filename if too long"""
if len(name.encode('utf-8')) <= max_len:
return name
@zeionara
zeionara / concat.sh
Created September 16, 2025 21:24
Concatenate mp4 files
#!/bin/bash
ffmpeg -i vitt1-cut.mp4 -i vitt2.mp4 \
-filter_complex "[0:v] [0:a] [1:v] [1:a] \
concat=n=2:v=1:a=1 [v] [a]" \
-map "[v]" -map "[a]" -qscale:v 3 vitt.mp4
@zeionara
zeionara / fix-aspect-ratio.sh
Created September 16, 2025 18:44
Fix aspect ratio in the fragment of du levande
#/bin/bash
# ffmpeg -i pastor-fix.mp4 \
# -map 0:v -map 0:a \
# -vf "scale=712:564:flags=lanczos, setsar=4:1.5" \
# -pix_fmt yuv420p \
# -c:a aac -b:a 128k \
# -movflags +faststart \
# -metadata:s:v rotate=0 \
# -reset_timestamps 1 \
@zeionara
zeionara / run.sh
Created May 16, 2025 12:46
Change dir colors
#!/bin/bash
dircolors -p > ~/.dircolors
eval $(dircolors ~/.dircolors)
@zeionara
zeionara / run.sh
Created May 16, 2025 09:29
Allow non-root access to docker
#/bin/bash
sudo setfacl --modify user:$1:rw /var/run/docker.sock
@zeionara
zeionara / build.log
Last active April 3, 2025 21:01
dev-libs/glib-2.80.5-r1 installation error
This file has been truncated, but you can view the full file.
 * Package: dev-libs/glib-2.80.5-r1:2
 * Repository: gentoo
 * Maintainer: gnome@gentoo.org
 * USE: abi_x86_64 amd64 elf elibc_glibc introspection kernel_linux mime xattr
 * FEATURES: network-sandbox preserve-libs sandbox userpriv usersandbox
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found sources for kernel version:
* 6.6.62-gentoo-dist
@zeionara
zeionara / restart-ngrok.sh
Last active November 18, 2024 18:25
Restart ngrok process
#!/bin/bash
delay=${1:-2} # seconds
# target_process="$(ps -aux | grep ngrok | grep -v grep | head -n 1 | cut -d ' ' -f 6)"
target_process="$(ps -aux | grep ngrok | grep -v grep | head -n 1 | awk '{print $2}')"
if test -z "$target_process"; then
echo 'No existing ngrok process'
else