Skip to content

Instantly share code, notes, and snippets.

View itsdmd's full-sized avatar
📚

Đức Đào itsdmd

📚
  • VNUHCM - University of Science
  • Vietnam
  • 03:14 (UTC +07:00)
  • LinkedIn in/itsdmd
View GitHub Profile
@itsdmd
itsdmd / ffmpeg-gnu-parallel-snippets.md
Last active March 29, 2025 17:52 — forked from Brainiarc7/ffmpeg-gnu-parallel-snippets.md
Some snippets you can quickly adapt for use with FFmpeg and GNU Parallel for use for standard tasks.

Useful Examples of ffmpeg and GNU parallel on the command-line:

Transcoding FLAC music to MP3:

ffmpeg is a highly useful application for converting music and videos. However, audio transcoding is limited to a a single core. If you have a large FLAC archive and you wanted to compress it into the efficient Opus codec, it would take forever with the fastest processor to complete, unless you were to take advantage of all cores in your CPU.

parallel --jobs <number of CPU cores to use> 'ffmpeg -v 0 -i "{}" -c:a libmp3lame -b:a 320k -map_metadata 0 -id3v2_version 3 "{.}.mp3"' ::: $(find -type f -name '*.flac')

Transcoding Videos to VP9:

@itsdmd
itsdmd / .gitignore
Created January 5, 2024 06:08 — forked from rojanshr1996/.gitignore
.gitignore for Flutter projects
### ------------------------- Flutter.gitignore ------------------------ ###
# Miscellaneous
*.class
#*.lock
*.log
*.pyc
*.swp
.DS_Store
.atom/
@itsdmd
itsdmd / docker-autocomposer.sh
Created February 18, 2023 14:11
Docker autocompose all running containers
#!/bin/sh
# https://github.com/Red5d/docker-autocompose
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/red5d/docker-autocompose $(docker ps -aq | tr '\n' ' ')
@itsdmd
itsdmd / .clang-format
Last active June 25, 2022 03:31
Clang Format config file (for clang-format 14)
Language: Cpp
AccessModifierOffset: -1
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: Never
@itsdmd
itsdmd / rcs_rnm--v.ahk
Last active May 4, 2022 02:25
AHK script fot recursive renaming (for folder nuking). This one add blank character in front of ".dll" files.
SendMode Input
FileSelectFolder, vFolder, *D:\Software\Steam\steamapps\common, 0
SetWorkingDir vFolder
FromPath = %vFolder%\*
Loop, %FromPath%,1,1
{
SplitPath, A_LoopFileFullPath
If ((InStr(A_LoopFileFullPath, "‎") == 0) && ((InStr(A_LoopFileFullPath, "steam_")) || (InStr(A_LoopFileFullPath, "Steam_")) || (InStr(A_LoopFileFullPath, "Unity")) || (InStr(A_LoopFileFullPath, "EasyAntiCheat_"))))
{
new := StrReplace(A_LoopFileFullPath, ".dll", "‎.dll")
@itsdmd
itsdmd / gnome_kb_exp.sh
Last active April 30, 2022 09:24
Scripts for backuping/restoring GNOME keybinding setting
#!/bin/bash
dconf dump /org/gnome/settings-daemon/plugins/media-keys/ > dump_1
dconf dump /org/gnome/desktop/wm/keybindings/ > dump_2
dconf dump /org/gnome/shell/keybindings/ > dump_3
dconf dump /org/gnome/mutter/keybindings/ > dump_4
dconf dump /org/gnome/mutter/wayland/keybindings/ > dump_5
@itsdmd
itsdmd / change_cm.txt
Last active March 15, 2022 06:03
Git Change CM
git rebase -i HEAD~2
pick e499d89 Delete CNAME
reword 0c39034 Better README
git push --force origin example-branch
@itsdmd
itsdmd / repo_reset.md
Last active April 29, 2022 14:15 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@itsdmd
itsdmd / CMakeLists.txt
Created February 22, 2022 03:50 — forked from dlime/CMakeLists.txt
Install Google Test and Google Mock on Ubuntu
cmake_minimum_required(VERSION 3.5)
project(example LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(GTest REQUIRED)
include_directories(${GTEST_INCLUDE_DIRS})
@itsdmd
itsdmd / Carl
Last active March 1, 2022 13:53
VS Code Terminal Themes
"workbench.colorCustomizations": {
"terminal.ansiBlack": "#434343",
"terminal.ansiBrightBlack": "#5e5e5e",
"terminal.ansiRed": "#fd3762",
"terminal.ansiBrightRed": "#fd3762",
"terminal.ansiGreen": "#279f9d",
"terminal.ansiBrightGreen": "#2db9b7",
"terminal.ansiYellow": "#e82d91"
"terminal.ansiBrightYellow": "#ff3da4",
"terminal.ansiBlue": "#3770eb",