Skip to content

Instantly share code, notes, and snippets.

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

Sajal Shrestha sajalshres

🏠
Working from home
  • Cotiviti Technologies
  • Kathmandu, Nepal
View GitHub Profile
@sajalshres
sajalshres / codedeploy.py
Created March 29, 2023 18:10
Trigger Code Deploy
import boto3
import sys
import time
from os import getenv
region_name = getenv("PROJECT_AWS_REGION")
account_id = getenv("PROJECT_AWS_ACCOUNTID")
assume_role_name = getenv("PROJECT_AWS_IAM_ROLENAME")
aws_access_key_id = getenv("PROJECT_AWS_ACCOUNT_ACCESSKEY")
aws_secret_access_key = getenv("PROJECT_AWS_ACCOUNT_SECRETKEY")
@sajalshres
sajalshres / logparser.py
Created October 12, 2023 03:41
Parse logs and extract unique stacktrace
import re
import os
import hashlib
import argparse
from typing import List
def get_argsparser() -> argparse.ArgumentParser:
"""Initialize and return the argument parser."""
parser = argparse.ArgumentParser(
@sajalshres
sajalshres / .env
Last active April 22, 2024 03:56
Update Atlassian Confluence Page with Table format
CONFLUENCE_TOKEN=<TOKEN>
CONFLUENCE_INSTANCE=<confluence.server.com>