Yaml
- id: 123456
name: Luke
title: Jedi Knight| #!/bin/bash | |
| SERIAL_NUMBER=$1 | |
| OTP=$2 | |
| PROFILE=$3 | |
| CREDENTIALS=$(aws sts get-session-token \ | |
| --serial-number ${SERIAL_NUMBER} \ | |
| --token-code ${OTP} \ | |
| --query 'Credentials.[AccessKeyId,SecretAccessKey,SessionToken]' \ | |
| --output text) |
| const axios = require('axios'); | |
| // Please replace the property values | |
| const config = { | |
| recaptcha: { | |
| secretKey: '<Your reCAPTCHA secret key>', | |
| }, | |
| }; | |
| exports.handler = async (event) => { |
| const Auth = require('@aws-amplify/auth').default; | |
| // Please replace the property values | |
| const config = { | |
| aws: { | |
| region: '<Your aws region>', | |
| cognito: { | |
| userPoolId: '<Your Cognito user pool ID>', | |
| userPoolWebClientId: '<Your Cognito user pool web client ID>', | |
| }, |
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <script src="https://www.google.com/recaptcha/api.js?render=Your_Recaptcha_Site_Key"></script> | |
| <h2>Sign up</h2> | |
| <form id="signup-form"> | |
| <div> | |
| <input type="email" name="username" placeholder="Email"> | |
| </div> |
| /** | |
| * Example | |
| * Input: 'INFO Records: {"user": {"name": "luke", "type": "jedi"}}{"name": "leia"}, Record count: 2' | |
| * Output: [ | |
| "INFO Records: ", | |
| "{\n \"user\": {\n \"name\": \"luke\",\n \"type\": \"jedi\"\n }\n}", | |
| "{\n \"name\": \"leia\"\n}", | |
| ", Record count: 2" | |
| ] | |
| */ |
| 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() { |
| 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 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; |
| import * as puppeteer from 'puppeteer'; | |
| interface PageInfoMap { | |
| [key: string]: string; | |
| } | |
| const pageInfoMap: PageInfoMap = { | |
| 'はちま起稿': 'http://blog.esuteru.com/', | |
| } |