Skip to content

Instantly share code, notes, and snippets.

View itsdmd's full-sized avatar
📚

Đức Đào itsdmd

📚
  • VNUHCM - University of Science
  • Vietnam
  • 17:41 (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 / 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 / tetris.bat
Created September 14, 2021 12:43 — forked from Hoffs/tetris.bat
Tetris in batch
@echo off
color 4F
title Tetris by
setlocal enabledelayedexpansion
mode con: cols=32 lines=35
set "hashBar=############"
set "ESpace= "
set "LowestYFig=1"