Skip to content

Instantly share code, notes, and snippets.

Christian Haller christianhaller3000

Block or report user

Report or block christianhaller3000

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@christianhaller3000
christianhaller3000 / mock.js
Created Jul 18, 2019
Mock node dns resolver
View mock.js
jest.mock("dns", () => {
return {
promises: {
Resolver: function() {
return {
resolveTxt: () => {
return ["1.1.1.1","2.2.2.2/28"];
}
};
}
View index.js
const { EC2 } = require("aws-sdk");
const region = "eu-central-1";
module.exports = async () => {
const ec2 = new EC2({
region
});
const { Regions } = await ec2.describeRegions().promise();
@christianhaller3000
christianhaller3000 / index.js
Last active Oct 2, 2019
find logs without retention
View index.js
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();
View index.js
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',
You can’t perform that action at this time.