Skip to content

Instantly share code, notes, and snippets.

@mehdimsv
mehdimsv / ffmpeg-convert-mp3-to-wave
Created March 16, 2024 07:16 — forked from vunb/ffmpeg-convert-mp3-to-wave
Convert mp3 to wave format using ffmpeg
ffmpeg -i input.mp3 -acodec pcm_s16le -ac 1 -ar 16000 output.wav
# To convert all mp3 files in a directory in Linux:
for f in *.mp3; do ffmpeg -i "$f" -acodec pcm_s16le -ac 1 -ar 16000 "${f%.mp3}.wav"; done
# Or Windows:
for /r %i in (*) do ffmpeg -i %i -acodec pcm_s16le -ac 1 -ar 16000 %i.wav

How to fix ".gitignore not working" issue?

Sometimes git does not exclude files/folders added .gitignore especially if you had commited them before. Here is how to fix it. I am ignoring node_modules from Angular 7 project as an example

  1. Update .gitignore with the folder/file name you want to ignore. You can use anyone of the formats mentioned below (prefer format1)
### Format1  ###
node_modules/
node/
@mehdimsv
mehdimsv / python_tips.py
Created January 24, 2020 13:05
Python tips
test_seq=[1,3,5]
print(test_seq)
# 3
print(test_seq.shape)
#(1,3)
print(*test_seq.shape)
#1 3
When use only positional arguments
def save_ranking(*args):
//check if a checkbox checked
var checked=$("#checkbox_id).is(":checked");
if(jQuery.pluginName){
//run related code
}
git checkout seotweaks
git merge -s ours master
git checkout master
git merge seotweaks