Skip to content

Instantly share code, notes, and snippets.

@geoffroymontel
geoffroymontel / gist:ba7885b7b9e2490c1d365b5e15cd78fd
Created October 4, 2020 07:37
Remove Mac specific files (.DS_Store, ._ files)
from cmd
del /s /q /f /a .DS_STORE
del /s /q /f /a ._*
@geoffroymontel
geoffroymontel / gist:1a941f01b8164dd2711ec09bf74a4ede
Created April 26, 2020 08:23
Using python3 with youtube-dl
python3 `which youtube-dl` yoururl
@geoffroymontel
geoffroymontel / gist:f334185d09ecd3ed376ceb7dc57268f4
Created January 5, 2020 13:28
Remove all old Ubuntu kernels from a VPS
dpkg --list linux-{headers,image,modules,tools}-\* | awk '{ if ($1=="ii") print $2}' | grep -v -e "$(uname -r | cut -d"-" -f1,2)" | xargs sudo dpkg --remove # use dpkg to remove all but the currently running kernel version
sudo apt-get install -f # It's common for apt to be in a broken state after running out of space on /boot
sudo apt-get autoremove # It's really common for apt to be broken on a package that should have been removed
sudo apt-get install -y linux-generic linux-headers-generic linux-image-generic linux-tools-generic # just in case latest kernel was mysteriously removed (e.g. when you are not running the latest kernel)
sudo update-grub # just in case it was not done automatically by dpkg
git fetch upstream pull/ID-PULL-REQUEST/head:NOM-BRANCHE-LOCALE
git checkout NOM-BRANCHE-LOCALE
@geoffroymontel
geoffroymontel / supercollider-website-redesign.md
Last active March 27, 2019 12:55
supercollider.github.io website redesign

Context

On Novembre 18th 2018, at the Supercollider dev meeting, we talked about redesigning the supercollider.github.io website with two main objectives :

  • mobile friendly
  • should feature some SC example code & sounds

Sections

  • SC logo
  • SC promise in one sentence : "an open source software environment and dynamic coding language for audio synthesis and algorithmic composition"
  • since 1996 ;)
  • what is SC in two or three lines
ffmpeg -err_detect ignore_err -i in.mp4 -c copy out.mp4
@geoffroymontel
geoffroymontel / gist:4a9494c8c3e2edb5ed320f2500fab953
Created August 22, 2016 09:04
Convert audio to FLAC 16khz mono
ffmpeg -i test_track.mp3 -ar 16000 -ac 1 -acodec flac test_track.flac
drutil burn -noverify -eject foo.cue
@geoffroymontel
geoffroymontel / gist:7db00e9e23c695e6a12b68c8942161e5
Last active December 26, 2019 20:46
extract srt from video
there is several subtitle format, SRT, STL(mainly use by Apple), etc.... and ffmpeg support a lot of them http://ffmpeg.org/general.html#Subtitle-Formats
and ffmpeg can extract them with cmd line the following sequence of command:
1) perform track identification
ffmpeg -i yourFile
@geoffroymontel
geoffroymontel / .bash_profile
Created April 25, 2016 16:04
Affichage du directory courant et de la branche git
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "