Skip to content

Instantly share code, notes, and snippets.

@atxryan
atxryan / prereqs.md
Last active October 21, 2019 17:23
NWA Tech Summit prerequites

We'll create an Ubuntu build server in Azure and use SSH to run docker commands. You should be able to SSH from your local machine. If you're unsure if SSH will work on your machine, open a terminal and try running the following command:

ssh [email protected]

It should fail, but this confirms that you can SSH into an Azure-hosted VM.

[email protected]: Permission denied (publickey).
@atxryan
atxryan / docker_install.sh
Created October 17, 2019 21:55
Docker build server setup
# add Docker group
groupadd docker
usermod -aG docker aks
# install some stuff
apt-get update
apt-get install -y apt-transport-https ca-certificates curl git wget nano lsb-release software-properties-common jq redis-tools gnupg-agent
chown -R aks:aks /home/aks
ffmpeg -f image2 -framerate 8 -pattern_type glob -i '*.JPG' \
-filter:v "scale='min(3648,iw)':'min(2736,ih)':force_original_aspect_ratio=decrease,pad=3648:2736:(ow-iw)/2:(oh-ih)/2" \
-c:v libx265 -crf 28 -preset medium video-3648-h265-medium.mp4
// .then() chaining
fetch("https://jsonplaceholder.typicode.com/users/1") //1
.then((response) => response.json()) //2
.then((user) => {
console.log(user.address); //3
});
// .then() callback