Skip to content

Instantly share code, notes, and snippets.


Kratik Jain k4kratik

View GitHub Profile
View CF-Stack-with-TTL.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Schedule automatic deletion of CloudFormation stacks
# Advance way to customize our Parameters inputs, looks very good to the users :)
License: Apache-2.0
- Label:
from datetime import datetime, timedelta
def deletion_time(ttl):
print("[DEBUG] The Current Time is: ",
delete_at_time = + timedelta(minutes=int(ttl))
print("[DEBUG] This Will be deleted at: ",delete_at_time)
hh = delete_at_time.hour
mm = delete_at_time.minute
yyyy = delete_at_time.year
month = delete_at_time.month
k4kratik /
Last active May 22, 2021
Script to find if your Docker image with the specific tag exists or not. Check the blog at
function DockerImageCheckFunction() {
# you can comment all the DEBUG echo statements, there are here just for info.
DHUB_TOKEN=$(curl -sSLd "username=${DOCKER_HUB_USERNAME}&password=${DOCKER_HUB_PASSWORD}" | jq -r ".token")
echo "[DEBUG] [$(date)] Token is: $DHUB_TOKEN"
echo "[DEBUG] [$(date)] Hitting the endpoint:${DOCKER_REPO}/tags/${DOCKER_TAG}/"
REPO_RESPONSE=$(curl -sH "Authorization: JWT $DHUB_TOKEN" "${DOCKER_REPO}/tags/${DOCKER_TAG}/")
k4kratik /
Last active Oct 12, 2020
Instructions on How to use k4kratik/zoho Docker Image to Automate your login on Zoho People.

To make this work as expected, provide these three Environments correctly and then you are good to go!

  1. ENV1 - your email - Plain text
  2. ENV2 - your password - Base64 encoded
  3. ZOHO_NOTIFY_WEBHOOK - Webhook, where you want to send notifications - Plain Text

I have tried with Webhook URL of one of my room on Google Chat.

So for setting up you env, do this -