This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:7.4.1708 | |
RUN yum install -y -q which vim wget git zip unzip gzip cmake make | |
ENV GOPATH=/opt/golang | |
WORKDIR $GOPATH | |
# Go references: | |
# https://golang.org/doc/install | |
# https://golang.org/cmd/go/#hdr-GOPATH_environment_variable |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// === Arrays | |
var [a, b] = [1, 2]; | |
console.log(a, b); | |
//=> 1 2 | |
// Use from functions, only select from pattern | |
var foo = () => [1, 2, 3]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
S3_BUCKET_NAME="${1?Missing 1st argument bucket Name}" | |
S3_KEY="${2?Missing 2nd argument bucket key}" | |
FILE_PATH="${3?Missing 3rd argument file path}" | |
formated_date=`date -R` | |
content_type="application/octet-stream" | |
curl -v -X PUT -T ${FILE_PATH} \ | |
-H "Host: ${S3_BUCKET_NAME}.s3.amazonaws.com" \ | |
-H "Date: ${formated_date}" \ | |
-H "Content-Type: ${content_type}" \ |
OlderNewer