Skip to content

Instantly share code, notes, and snippets.

View sanudatta11's full-sized avatar
🏠
Working from home

Soumyajit Dutta sanudatta11

🏠
Working from home
View GitHub Profile
@sanudatta11
sanudatta11 / apache.conf
Created July 10, 2019 07:49
Medium Publication Apache Conf
input {
kafka {
bootstrap_servers => "localhost:9092"
topics => "apache"
}
}
filter {
grok {
match => { "message" => "%{COMBINEDAPACHELOG}" }
@sanudatta11
sanudatta11 / Telegram_Echo_Bot.py
Created October 26, 2019 06:48
This is the Code for Telegram Echo Bot. Put your Bot Token ID in Environment with Key TOKEN
import json
import os
from botocore.vendored import requests
TOKEN = os.environ['TOKEN']
API = "https://api.telegram.org/bot{}/".format(TOKEN)
def send_message(text, chat_id):
final_text = "Your Message was: " + text
url = API + "sendMessage?text={}&chat_id={}".format(final_text, chat_id)
@sanudatta11
sanudatta11 / install-chef-server.sh
Created November 17, 2019 04:11
This is the Boostrap script for creating a chef server on Ubuntu 16.04+ versions
#!/bin/bash
apt-get update
apt-get -y install curl
# create staging directories
if [ ! -d /drop ]; then
mkdir /drop
fi
if [ ! -d /downloads ]; then
@sanudatta11
sanudatta11 / Log Group Purger
Created January 1, 2020 06:43
This Script Purges a Log Group but doesn't delete the Log Group. It Shows Current Progress and Confirms with you before deleting the streams
#!/usr/bin/env bash
LOG_GROUP_NAME=${1:?log group name is not set}
echo Getting stream names...
LOG_STREAMS=$(
aws logs describe-log-streams \
--log-group-name ${LOG_GROUP_NAME} \
--query 'logStreams[*].logStreamName' \
--output table |
@sanudatta11
sanudatta11 / app.yaml
Created July 8, 2023 15:44
Load Testing CF
Description: (SO0062) - Distributed Load Testing on AWS is a reference architecture to perform application load testing at scale. Version v3.2.1
AWSTemplateFormatVersion: "2010-09-09"
Metadata:
AWS::CloudFormation::Interface:
ParameterGroups:
- Label:
default: Console access
Parameters:
- AdminName
- AdminEmail