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
import fs from 'node:fs'; | |
import { | |
S3Client, | |
PutObjectCommand | |
} from "@aws-sdk/client-s3"; | |
import { createPresignedPost } from '@aws-sdk/s3-presigned-post'; | |
import FormData from 'form-data'; | |
const client = new S3Client({ region: "ap-southeast-2" }); |
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
import https from "node:https"; | |
import { XMLParser } from "fast-xml-parser"; | |
import fs from 'node:fs'; | |
import { | |
S3Client, | |
PutObjectCommand | |
} from "@aws-sdk/client-s3"; | |
import { | |
getSignedUrl, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
terraform { | |
required_version = ">= 0.12" | |
} | |
# default region required. | |
provider "aws" { | |
region = "us-east-1" | |
} | |
provider "aws" { |
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
for x in $(aws iam list-users --output text --query 'Users[*].UserName'); | |
do | |
echo "$x?" | |
read choice | |
case "$choice" in | |
y|Y ) echo $(aws iam update-login-profile --user-name $x --password-reset-required);; | |
n|N ) echo "no";; | |
* ) echo "invalid";; | |
esac | |
; |
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
apt-get install gcc make libssl-dev | |
cd /usr/src | |
wget https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.6.tar.gz | |
tar -xvzf ruby-2.2.6.tar.gz | |
cd ruby-2.2.6 |
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
#cloud-config | |
apt_update: true | |
apt_upgrade: false | |
apt_preserve_sources_list: true | |
packages: | |
- openjdk-7-jre-headless | |
- awscli | |
- git |
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
function confirm () { | |
# call with a prompt string or use a default | |
read -r -p "${1:-Are you sure? [y/N]} " response | |
case $response in | |
[yY][eE][sS]|[yY]) | |
true | |
;; | |
*) | |
false | |
;; |
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
git push origin $(git branch -r --merged origin/master | sed "s/origin\\//:/" | egrep -v "HEAD|master|dev") |
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/sh | |
# /etc/init.d/foobar | |
# The following part always gets executed. | |
echo "This part always gets executed" | |
# The following part carries out specific functions depending on arguments. | |
case "$1" in | |
start) | |
echo "Starting foobar" |
NewerOlder