You need a recent enough version of git. If you're on ubuntu/debian, this will get the most recent stable version.
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update| @RequestMapping(value = "/", method = RequestMethod.GET) | |
| public String home(@RequestHeader("User-Agent") String userAgent, HttpServletResponse response) { | |
| logger.info(userAgent); | |
| if (userAgent.contains("MSIE")) { | |
| logger.info("Adding response header for IE"); | |
| response.addHeader("X-UA-Compatible", "IE=edge,chrome=1"); | |
| } | |
| return "home"; | |
| } |
We can't do this with youtube-dl alone, we can pair this
with ffmpeg to acomplish this task though. We use youtube-dl and ffmpeg
to resolve the URL of the video, and then tell ffmpeg to download the range itself.
So to take a sound byte from this podcast and use it to create my ringtone:
$ audio_url="$(youtube-dl --audio-format mp3 --get-url https://youtu.be/s8tJ-R28HX8 | grep mime=audio | head -n 1)"
$ ffmpeg -ss 02:00:02.10 -i "${audio_url}" -t 00:00:12 -c:a mp3 paul-ringtone.mp3$ [ ! -d /opt/SHADERed ] || sudo rm -rf /opt/SHADERed
$ sudo apt-get install -y libsfml-dev
$ cd /tmp
$ zip_url="$(curl https://api.github.com/repos/dfranx/SHADERed/releases | jq '.[0].assets[] | select(.name | contains("Linux.zip")) | .browser_download_url' -r)"
$ curl -JL "${zip_url}" -o shadered-linux.zip
$ unzip shadered-linux.zip
$ sudo mv SHADERed /opt/SHADERedTODO: make this generic
$ docker pull golang:1.15
$ docker pull python:3
$ docker pull amazonlinux:latest| #!/usr/bin/env bash | |
| set -euxo pipefail | |
| # Base system | |
| sudo apt-get update | |
| sudo apt-get upgrade -y | |
| # Git | |
| git config --global user.name 'Niko Dunixi [He/Him]' | |
| git config --global user.email '1402178+niko-dunixi@users.noreply.github.com' | |
| git config --global init.defaultBranch main | |
| # GoLang |