Yaml
- id: 123456
name: Luke
title: Jedi Knight| let response = await login(email, password) | |
| const idToken = response.AuthenticationResult.IdToken | |
| const { identityId, credentials } = await getUserCredentials(idToken) | |
| const s3 = new AWS.S3({ credentials }) | |
| response = await s3.putObject({ | |
| Body: 'Hello world', | |
| Bucket: process.env.S3_BUCKET, | |
| Key: `${identityId}/foo.txt`, | |
| ContentType: 'text/plain' |
| variable "aws_region" { | |
| default = "us-east-1" | |
| } | |
| variable "vpc_cidr" { | |
| default = "10.0.0.0/16" | |
| } | |
| variable "webSubnetCidr" { | |
| default = "10.0.1.0/24" |
| import { Component, OnInit, Injectable } from '@angular/core'; | |
| import { Router } from '@angular/router'; | |
| import { Observable } from 'rxjs'; | |
| import { HttpHeaders, HttpClient } from '@angular/common/http'; | |
| import { map } from 'rxjs/operators'; | |
| import { environment } from './../environments/environment'; | |
| const clientId = environment.clientId; | |
| const scope = 'https://www.googleapis.com/auth/youtube.readonly'; |
| const AWS = require('aws-sdk'); | |
| const s3 = new AWS.S3({apiVersion: '2006-03-01'}); | |
| const uuidv4 = require('uuid/v4'); | |
| const bucketName = process.env.bucketName; | |
| const kmsKeyId = process.env.kmsKeyId; | |
| const MAX_FILE_SIZE = 5 * 1024 * 1024; | |
| const EXPIRATION = 900; |
| { | |
| "compilerOptions": { | |
| "outDir": "./built", | |
| "allowJs": true, | |
| "target": "ES2018", | |
| "moduleResolution": "node", | |
| "module": "commonjs" | |
| }, | |
| "include": [ | |
| "./src/**/*" |
| import * as puppeteer from 'puppeteer'; | |
| interface PageInfoMap { | |
| [key: string]: string; | |
| } | |
| const pageInfoMap: PageInfoMap = { | |
| 'はちま起稿': 'http://blog.esuteru.com/', | |
| } |
| const axios = require('axios'); | |
| const url = require('url'); | |
| if (process.argv && process.argv.length < 3) { | |
| console.error('Invalid number of parameters'); | |
| process.exit(1); | |
| } | |
| const downloadLink = process.argv[2]; | |
| const domain = process.env.domain; |
| const util = require('util'); | |
| const child_process = require('child_process'); | |
| const exec = util.promisify(child_process.exec); | |
| function addPassword(serviceName, userName, password) { | |
| return exec(`security add-generic-password -s ${serviceName} -a ${userName} -w ${password}`); | |
| } | |
| async function getPassword(serviceName, userName) { |
| const { src, dest, series, parallel } = require('gulp'); | |
| const install = require('gulp-install'); | |
| const del = require('del'); | |
| const zip = require('gulp-zip'); | |
| const BUILD_DIR = 'build'; | |
| const packageInfo = require('./package.json'); | |
| function clean() { |