This file contains 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
[ | |
{ | |
"name": "Afghanistan", | |
"code": "AF" | |
}, | |
{ | |
"name": "Albania", | |
"code": "AL" | |
}, | |
{ |
This file contains 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
#!/usr/bin/env node | |
const { red, cyan, green } = require("chalk"); | |
const argv = require("yargs").argv; | |
const { Octokit } = require("@octokit/rest"); | |
/** | |
* A simple script that triggers GitHub workflows. | |
*/ | |
(async () => { |
This file contains 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
const S3 = require("aws-sdk/clients/s3"); | |
const uniqid = require("uniqid"); | |
const mime = require("mime"); | |
/** | |
* Use AWS SDK to create pre-signed POST data. | |
* We also put a file size limit (100B - 10MB). | |
* @param key | |
* @param contentType | |
* @returns {Promise<object>} |
This file contains 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
service: presignedPostData | |
provider: | |
name: aws | |
runtime: nodejs8.10 | |
functions: | |
getPresignedPostData: | |
handler: handler.getPresignedPostData | |
events: |
This file contains 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 React from "react"; | |
import Files from "react-butterfiles"; | |
/** | |
* Retrieve pre-signed POST data from a dedicated API endpoint. | |
* @param selectedFile | |
* @returns {Promise<any>} | |
*/ | |
const getPresignedPostData = selectedFile => { | |
return new Promise(resolve => { |
This file contains 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 React from "react"; | |
import Files from "react-butterfiles"; | |
/** | |
* Retrieve pre-signed POST data from a dedicated API endpoint. | |
* @param selectedFile | |
* @returns {Promise<any>} | |
*/ | |
const getPresignedPostData = selectedFile => { | |
return new Promise(resolve => { |
This file contains 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
HOST <yourHost> | |
HostName <IP or DNS of the Host> | |
Port <port (just needed if other then the standard (22))> | |
User <username to connect> | |
IdentityFile <path to .pem file> |