Skip to content

Instantly share code, notes, and snippets.

View masoom's full-sized avatar
🔨

Masoom Tulsiani masoom

🔨
View GitHub Profile
@sophea
sophea / alert_ms_team
Last active February 24, 2024 13:09
Lambda function alert the message to ms-team
import json
import logging
import os
from urllib.request import Request, urlopen
from urllib.error import URLError, HTTPError
HOOK_URL = os.environ['HookUrl']
logger = logging.getLogger()
OS Copy Paste
Linux Select the text Middle mouse button
Mac ⌘+C ⌘+V
Windows Ctrl+Insert Shift+Insert
@mateobur
mateobur / prometheus-example.yaml
Created June 21, 2018 12:12
Prometheus monitoring Kubernetes example file
apiVersion: apps/v1
kind: Deployment
metadata:
name: prometheus-deployment
labels:
app: prometheus
purpose: example
spec:
replicas: 2
selector:
@anttu
anttu / secretsmanager.tf
Created May 4, 2018 16:03
Terraform AWS Secrets Manager example with key and value
resource "aws_secretsmanager_secret" "IRCSecrets" {
name = "irc/client/credentials"
description = "My IRC client credentials"
}
resource "aws_secretsmanager_secret_version" "IRCCredentials" {
secret_id = "${aws_secretsmanager_secret.IRCSecrets.id}"
secret_string = "{\"username\":\"AzureDiamond\",\"password\":\"hunter2\"}"
}
@tstrohmeier
tstrohmeier / bitbucket-pipelines.yml
Last active September 3, 2025 10:29
AWS ECS: Script for creating a new revision of a task definition and update a service
# enable Docker for your repository
options:
docker: true
pipelines:
branches:
development:
- step:
# python image with aws-cli installed
Linux Select the text Middle mouse button
Mac ⌘+C ⌘+V
Windows Ctrl+Insert Shift+Insert
@richadams
richadams / pd_aws_config_event_transformer.js
Created February 9, 2018 22:55
PagerDuty Custom Event Transformer for handling AWS Config compliance events from SNS. Raising incidents if a resource goes non-compliant, and resolving the incident if they go compliant again (or are deleted).
// Parses AWS Config events from SNS and will raise PagerDuty incidents if resources
// go non-compliant, resolving the incident when they return to compliant.
//
// This file is intended to be used with a PagerDuty Custom Event Transformer.
// https://www.pagerduty.com/docs/guides/custom-event-transformer/
//
// Create a new Custom Event Transformer integration in PagerDuty, and subscribe it's
// Integration URL on the SNS Topic that you send AWS Config events to.
//
// You can see all the different notifications Config sends here:
@shortjared
shortjared / list.txt
Last active March 9, 2026 12:12
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com
@andkirby
andkirby / slack.sh
Last active February 14, 2026 00:43
Shell/Bash script for sending slack messages.
#!/usr/bin/env bash
####################################################################################
# Slack Bash console script for sending messages.
####################################################################################
# Installation
# $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack
# $ chmod +x /usr/bin/slack
####################################################################################
# USAGE
# Send message to slack channel/user