Skip to content

Instantly share code, notes, and snippets.

View aniongithub's full-sized avatar

Ani aniongithub

View GitHub Profile
@aniongithub
aniongithub / add_timer.sh
Last active September 12, 2024 18:44
Add a timer or other text display to a video using FFMPEG
#!/bin/bash
# From: https://discuss.kde.org/t/date-time-overlay-in-timelapse-video/2880/5
# Monospaced font from here: https://www.1001fonts.com/download/digital-7.zip
INPUT_FILE="video.mp4"
TOTAL_DURATION=30 # Total duration in seconds
FPS=30
FONT_FILENAME="./digital-7/digital-7 (mono).ttf"
FONT_SIZE=72
@aniongithub
aniongithub / .bash_aliases
Last active February 11, 2025 18:43
Add a shareable monitor to the lower left of a 4K (2160p) monitor with xrandr
# Save this to your ~/.bash_aliases file or ~/.bashrc directly
alias add-monitor="xrandr --setmonitor screenshare 1920/1x1080/1+0+1080 none"
alias remove-monitor="xrandr --delmonitor screenshare"
@aniongithub
aniongithub / CMakeLists.txt
Last active February 25, 2025 07:16
Use glad as a static lib with CMake FetchContent
...
# https://github.com/Dav1dde/glad/issues/397#issue-1463640603
# This doesn't work out of the box with conflicting targets, forcing shared libs, etc.
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE) # Ugly way to force static glad build
# Fetch GLAD from GitHub
FetchContent_Declare(glad_src
GIT_REPOSITORY https://github.com/Dav1dde/glad.git