Skip to content

Instantly share code, notes, and snippets.

View MartyLake's full-sized avatar

Matthieu Talbot MartyLake

  • Expressive
  • France
View GitHub Profile
#!/bin/sh
#
# This pre-commit hook checks if clang-format-7
# is installed, and if so, uses the installed version to format
# the staged changes.
#
# Installation instructions from : https://github.com/arduino/ArduinoCore-arc32/wiki/Creating-a-pre-commit-hook-for-clang-format
# cd your-repository
# curl https://gist.githubusercontent.com/MartyLake/17ecdf00d6036b0f5773fa7bcd313e69/raw > .git/hooks/pre-commit
# chmod a+x .git/hooks/pre-commit
@MartyLake
MartyLake / Create an album: Normalize all wav volume and convert all wav to mp3
Last active December 11, 2021 14:08 — forked from championofblocks/wav-mp3
Create an album: Normalize all wav volume and convert all wav to mp3
# dont normalize here if songs have different intensity, for example quiet intro song followed by loud pop song
# from http://normalize.nongnu.org/README.html
# normalize -bv *.wav
# from https://gist.github.com/championofblocks/3982727
for i in *.wav; do lame -b 320 -h "${i}" "${i%.wav}.mp3"; done
# from https://askubuntu.com/questions/65331/how-to-convert-a-m4a-sound-file-to-mp3
# + https://askubuntu.com/questions/385636/what-is-the-proper-way-to-convert-flac-files-to-320-kbit-sec-mp3
find . -type f -name '*.m4a' -exec bash -c 'avconv -i "$0" -qscale:a 0 "${0/%m4a/mp3}"' '{}' \;