I hereby claim:
- I am nikole-dunixi on github.
- I am nikoledunixi (https://keybase.io/nikoledunixi) on keybase.
- I have a public key ASBKW2rD7X6Pp_o_IJFLntMb6tXTlNFT2ZUJgZtlvaP6jAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| // https://medium.com/@nate510/don-t-use-go-s-default-http-client-4804cb19f779 | |
| client := &http.Client{ | |
| Timeout: time.Second * 10, | |
| Transport: &http.Transport{ | |
| Dial: (&net.Dialer{ | |
| Timeout: 5 * time.Second, | |
| }).Dial, | |
| TLSHandshakeTimeout: 5 * time.Second, | |
| }, | |
| } |
| // Custom comparison function | |
| func compareStructs(a, b interface{}) { | |
| valA := reflect.ValueOf(a) | |
| valB := reflect.ValueOf(b) | |
| for i := 0; i < valA.NumField(); i++ { | |
| fieldA := valA.Field(i) | |
| fieldB := valB.Field(i) | |
| if !reflect.DeepEqual(fieldA.Interface(), fieldB.Interface()) { |
| #!/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 '[email protected]' | |
| git config --global init.defaultBranch main | |
| # GoLang |
TODO: make this generic
$ docker pull golang:1.15
$ docker pull python:3
$ docker pull amazonlinux:latest$ [ ! -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/SHADERedWe 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