Skip to content

Instantly share code, notes, and snippets.

View itsbhm's full-sized avatar

Shubham Vishwakarma itsbhm

View GitHub Profile
@itsbhm
itsbhm / smtp_generate.sh
Created September 13, 2025 15:47
Obtaining Amazon SES SMTP credentials
#!/bin/bash
# Make it executable: chmod +x smtp_generate.sh
# Prompt for inputs (Secret Access Key visible)
read -p "Enter your AWS Secret Access Key: " SECRET_KEY
read -p "Enter your AWS Region (e.g., ap-south-1): " REGION
# Generate SMTP password using full AWS algorithm
SMTP_PASSWORD=$(python3 <<EOF
@itsbhm
itsbhm / index.html
Last active January 13, 2025 20:49
Sample HTML Home Page with Slider (E-Commerce) | Tailwind
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>EcoShop - Your Eco-Friendly Marketplace</title>
<script src="https://cdn.tailwindcss.com"></script>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"
Program and Software Required:
i). OS
ii). Text Editor
iii). FTP Client
iv). Terminal Emulator
v). Browser
What is shell?
-> User Interaction.
-> Commands from the Keyboard.
Header set X-XSS-Protection 0
Header set Content-Security-Policy "upgrade-insecure-requests; frame-ancestors 'self';"
Header set Referrer-Policy "strict-origin-when-cross-origin"
Header set Permissions-Policy: camera=('self')
Header Set Strict-Transport-Security: "max-age=63072000; includeSubDomains; preload"
Status:
1). Pending
2). Complete
3). Refunded
4). Failed
5). Abandoned
6). Revoked
<!DOCTYPE html>
<html lang="en">
<head><meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>404 Not found</title>
<style>
body {
<!Doctype html>
<html>
<title>Site Maintenance</title>
<head>
<style>body{text-align: center; padding: 150px;}h1{font-size: 50px;}body{font: 20px Helvetica, sans-serif; color: #333;}article{display: block; text-align: left; width: 650px; margin: 0 auto;}a{color: #dc8100; text-decoration: none;}a:hover{color: #333; text-decoration: none;}</style>
</head>
<body>
<article>
<h1>I&rsquo;ll be back soon!</h1>
<div>
X-SES-CONFIGURATION-SET: tracking-id
X-SES-MESSAGE-TAGS: CAMPAIGN= CampaignName
From: sender@domain.com
To: receiver@domain.com
Subject: Test email
Content-Type: multipart/alternative;
boundary="----=_boundary"
------=_boundary
Content-Type: text/html; charset=UTF-8
@itsbhm
itsbhm / welcome.html
Created November 8, 2021 16:03
Simple Message
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Welcome</title>
<link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">
@itsbhm
itsbhm / html-iso-dt.php
Created July 21, 2021 13:16
MySql date format to ISO HTML
<?php
date_default_timezone_set("Asia/Kolkata");
$html_dt = "2021-10-20T15:30";
$for_sql = date("Y-m-d H:i:s", strtotime($html_dt));
echo date_format(new DateTime($for_sql), 'c'); // ISO8601 Format
echo("<hr>");
echo date_format(new DateTime($for_sql), 'Y-m-d\TH:i:s'); // Custom Format for HTML Support