Skip to content

Instantly share code, notes, and snippets.

View tobadia's full-sized avatar

Thomas Obadia tobadia

  • Institut Pasteur
  • Paris, France
View GitHub Profile
@tobadia
tobadia / .zprofile
Last active June 26, 2025 15:46
My custom .zprofile file
# ---------------------------------------------------------------------------
#
# Description: This file holds all my ZSH environment configurations
# It is forked from my previous .bash_profile file, and contains
# only the section(s) relevant to $PATH statements.
# It relates only to exported variables that should be
# available to other programs.
#
# Sections:
# 1. Environment Configuration
@tobadia
tobadia / .zshrc
Last active June 26, 2025 15:22
My complete .zshrc file after switching from bash to zsh (finally)
# ---------------------------------------------------------------------------
#
# Description: This file holds all my ZSH environment configurations
# It is forked from my previous .bash_profile file, and
# commands to set up aliases, functions, options, key bindings...
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
@tobadia
tobadia / ffmpeg_overlay_help
Created November 11, 2020 16:53
Incrustation de deux vidéos (Panopto)
# Usage principal (1 seule ligne)
# ffmpeg
# -i VIDEO_PRINCIPALE Fichier MP4 en .SCREEN.localview.mp4
# -i VIDEO_A_INCRUSTER Fichier MP4 en .DV.localview.mp4
# -ss TEMPS_A_RETIRER_AU_DEBUT Temps à couper, en secondes
# -filter_complex "..." Filtre à appliquer aux vidéos, cf. ci-dessous:
# "[1]scale=-1:ih/5 [pip]; La piste vidéo d'index 1 (2è en comptant de 0, càd 2è fichier d'entrée) est remise à l'échelle à 1/5è de sa hauteur et la largeur change de façon correspondante, et cette piste est ensuite dénommée 'pip' pour la référencer ici
# [0][pip] overlay=main_w-overlay_w-10:10" La piste vidéo d'index 0 (principale) se voit incrustée la pistes nommée 'pip' de façon à laisser 10 pixels à droite (lareur totale - largeur overlay - 10) et 10 en haut (10).
# output.mp4 Nom du fichier de sortie
@tobadia
tobadia / Synology hibernation issues
Last active May 3, 2020 13:03
Synology hibernation issues
# Delete undesired cron tasks
synoschedtask --get
synoschedtask --del id=...
@tobadia
tobadia / ffmpeg_video_to_gif
Last active July 17, 2018 13:41
Use ffmpeg to convert a video to a gif
ffmpeg -i input.mp4 -ss 00:00:24.000 -to 00:00:27.500 -vf scale=640:360 -r 20 cut.gif -hide_banner
# -ss: start time
# -to: end time (alternative: -t duration)
# -vf: rescale
# -r : change framerate to specified value
@tobadia
tobadia / mkvdts2ac3_helper
Last active August 7, 2017 12:45
Convert DTS audio to AC3 in a MKV file
#######################################################################
## Correct use of DTS2AC3 script forked from GitHub ##
## ##
## Source: https://github.com/JakeWharton/mkvdts2ac3 ##
## Last edit: 2017-05-30 ##
#######################################################################
## I forked the repo and cloned it into my NAS as of today
## Requirement: ffmpeg, mkvtoolnix, rsync
@tobadia
tobadia / Edit Android system files
Last active January 11, 2025 20:56
How to edit files on /system Android partition
#######################################################################
## Short reminder of how to edit a file in /system Android partition ##
## ##
## Useful because only a buggy version of vim is available on device ##
## Last edit: 2017-05-30 ##
#######################################################################
## Mount /system as rw and pull Bloat Removal Script
adb root
@tobadia
tobadia / .bash_profile
Last active June 15, 2025 20:12
Custom .bash_profile: one .bash_profile to rule them all
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
# CM is dead, long live LineageOS
# Last update: 2017-05-08
# Initial state
Unlocked bootloader, any recovery, any rom, root enabled, TitaniumBackup installed
# Available documentation
LineageOS vanilla (official) https://forum.xda-developers.com/oneplus-one/orig-development/official-lineageos-14-1-oneplus-one-t3543489
LineageOS changelog (official) https://www.lineageoslog.com/14.1/bacon
@tobadia
tobadia / Some mkvtoolnix tweaks
Last active April 21, 2017 13:14
mkvtoolnix: remove 'header compression' for mkvmerge on old releases (>= 4.2.0 and below 6.x ?)
# The mkvtoolnix version that can be used on ARMv5 devices is an old 4.2.0-1 release.
# In this release, default is to switch on 'header compression'
# The solution is to take all tracks from a compressed file and have the corresponding headers uncompressed with the `--compression -1:none` (-1 is a wildcard for 'all tracks')
# This flag must be used for each input file, e.g.
mkvmerge -o "output.mkv" --compression -1:none "input1.mp4" --compression -1:none "input2.ac3" ...
# So, for adding subs.srt in an already existing mkv: