Skip to content

Instantly share code, notes, and snippets.

View antoinedelia's full-sized avatar
☁️

Antoine Delia antoinedelia

☁️
View GitHub Profile
@hrldcpr
hrldcpr / tree.md
Last active June 19, 2025 08:17
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active September 14, 2025 16:48
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@mixxorz
mixxorz / waveform.py
Last active February 5, 2025 12:02
Generate waveform images from audio files
# Requires pydub (with ffmpeg) and Pillow
#
# Usage: python waveform.py <audio_file>
import sys
from pydub import AudioSegment
from PIL import Image, ImageDraw
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active September 12, 2025 09:40
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active September 14, 2025 16:41
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@antoinedelia
antoinedelia / mkvtoolnix.sh
Last active August 11, 2025 13:27
MKVToolNix useful commands
# https://www.fosshub.com/MKVToolNix.html
$ sudo apt install mkvtoolnix
# Update the default audio track to the second one in all the files in the current directory
$ for i in *; do if [[ $i == *.mkv ]]; then mkvpropedit "$i" --edit track:a1 --set flag-default=0 --edit track:a2 --set flag-default=1; fi; done
# If you have a single subtitle, and you want it to be default, then do:
$ for i in *; do if [[ $i == *.mkv ]]; then mkvpropedit "$i" --edit track:s1 --set flag-default=1; fi; done
# Merge two files into one