Skip to content

Instantly share code, notes, and snippets.

View alexanderdombroski's full-sized avatar

Alex Dombroski alexanderdombroski

View GitHub Profile
@alexanderdombroski
alexanderdombroski / ffpmg.md
Created July 29, 2025 16:20
Super long commands it doesn't make sense to remember

Commands

mov->gif
ffmpeg -i input.mov -vf "fps=10,scale=480:-1:flags=lanczos" -y output.gif

mov->gif (x2 speed)
ffmpeg -i input.mov -vf "setpts=0.5*PTS,fps=10,scale=480:-1:flags=lanczos" -y output.gif

@alexanderdombroski
alexanderdombroski / python-json.code-snippets
Created May 3, 2025 22:16
Python snippet functions that interact with json in a file or from an API. Each has a prefix beginning with json. | Created using SnippetStudio
{
"read json from file": {
"prefix": "json_read",
"body": [
"def read_json(filename: str) -> any:",
" with open(filename) as file_data:",
" json_data = json.load(file_data)",
" return json_data"
],
"description": "Reads json from a file using the import json library",
@alexanderdombroski
alexanderdombroski / .gitconfig
Last active November 5, 2025 00:32
Adds extra git commands.
[alias]
alist = "!gh gist view $(git aliases-gist) --filename command-list.md"
conflict = "!f() { \
TO=$1; \
TMP=$(mktemp); \
git merge-tree $(git merge-base HEAD $TO) HEAD $TO > $TMP; \
if grep -q '<<<<<<<' $TMP; then \
awk ' \
/<<<<<<< / { in_conflict=1; print; next } \
/>>>>>>> / { print; in_conflict=0; next } \