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 { SecretsManager } = require('aws-sdk'); | |
module.exports = async () => { | |
const secretsManager = new SecretsManager(); | |
const { SecretList } = await secretsManager.listSecrets().promise(); | |
const secrets = SecretList.map(async secret => secretsManager.getSecretValue({ | |
SecretId: secret.Name, | |
VersionStage: 'AWSCURRENT', |
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 { EC2 } = require("aws-sdk"); | |
const region = "eu-central-1"; | |
module.exports = async () => { | |
const ec2 = new EC2({ | |
region | |
}); | |
const { Regions } = await ec2.describeRegions().promise(); |
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 { CloudWatchLogs, EC2 } = require("aws-sdk"); | |
const region = "eu-central-1"; | |
module.exports = (async () => { | |
try { | |
const ec2 = new EC2({ | |
region | |
}); | |
const { Regions } = await ec2.describeRegions().promise(); |
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
/* eslint-disable import/no-extraneous-dependencies */ | |
const fetch = require("node-fetch"); | |
const log = require("debug")("app:circleci"); | |
module.exports = async ({ circleToken, workflowId }) => { | |
// wait for https://ideas.circleci.com/ideas/CCI-I-295 | |
const url = `https://circleci.com/api/v2/workflow/${workflowId}?circle-token=${circleToken}`; | |
// trigger api with node-fetch | |
const { name } = await ( |
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 fetch = require("node-fetch"); | |
const fn = async () => { | |
const token = "11e01fc60358e3d96947ab6d4afaee66"; | |
const today = new Date().toDateString(); | |
const iconMap = { | |
"10": "Ⓥ", | |
"11": "🌱", | |
"12": "🌾", | |
"13": "🚫🥛", |
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 { User, IAMClient, ListUsersCommand } from "@aws-sdk/client-iam"; | |
import { formatDistance } from "date-fns"; | |
const getUsers = async (m: string | undefined, iamUsers: User[] = []) => { | |
const { Users, Marker, IsTruncated } = await new IAMClient({}).send( | |
new ListUsersCommand({ | |
Marker: m, | |
}) | |
); |
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
/* | |
change the sass compiler from dart-sass to libsass, | |
retrigger compiling and | |
see the missing selector in the right window | |
*/ | |
%placeholder { |
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
jest.mock("dns", () => { | |
return { | |
promises: { | |
Resolver: function() { | |
return { | |
resolveTxt: () => { | |
return ["1.1.1.1","2.2.2.2/28"]; | |
} | |
}; | |
} |