Skip to content

Instantly share code, notes, and snippets.

View amarjeetsahoo's full-sized avatar
🏌️‍♂️
Don't just set goals! Hunt them down.

Amarjeet Sahoo amarjeetsahoo

🏌️‍♂️
Don't just set goals! Hunt them down.
View GitHub Profile
@amarjeetsahoo
amarjeetsahoo / Strong-Password-Regex.md
Created August 6, 2021 06:55
strong-password-regular expression for JavaScript & TypeScript
  • Passwords will contain at least 1 upper case letter
  • Passwords will contain at least 1 lower case letter
  • Passwords will contain at least 1 number or special character
  • There is no length validation (min, max) in this regex!

Regular expression for JavaScript:

/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/
@amarjeetsahoo
amarjeetsahoo / best-backend-hosting-servers.md
Last active June 16, 2023 18:44
Best-Backend-hosting-server-for-free
Service Type RAM Storage Limitations
AWS EC2 IaaS 1 GB Only free for 1 year
Azure App Service PaaS 1 GB 1 GB 60 CPU minutes/day
Azure VM IaaS 1 GB 2 GB (non-persistent) Only free for 1 year
Google App Engine PaaS 128 MB 1 GB Standard Environment only
Limited to Go, Java, Node.js, PHP, Python; 1 GB/day outbound traffic; 9 backend instance hours/day
Google Compute Engine IaaS 0.6 GB 30 GB 1 GB/month outbound traffic (not including China or Australia). After the first year there's no way
@amarjeetsahoo
amarjeetsahoo / oddeven.c
Created November 3, 2020 05:54
Program to check if the number is odd or even by divide and multiply by 2
#include <stdio.h>
int main()
{
int n;
printf("Enter a number");
scanf("%d",&n);
if((n/2)*2==n) printf("%d is Even",n);
else printf("%d is Odd",n);
}
@amarjeetsahoo
amarjeetsahoo / instadp.py
Created August 22, 2020 18:30
This code will help you to download anyone's Instagram profile picture/DP easily.
#before running this code install Instaloader Module.
#using this command: pip install instaloader
#run this on your command prompt.
import instaloader
mod=instaloader.Instaloader()
a=input("Enter Username:")
mod.download_profile(a,profile_pic_only=True)
@amarjeetsahoo
amarjeetsahoo / indianflag.py
Last active August 15, 2022 22:55
Python code to display indian flag
import numpy as np
import matplotlib.pyplot as py
import matplotlib.patches as patch
a = patch.Rectangle((0,1), width=12, height=2, facecolor='green', edgecolor='grey')
b = patch.Rectangle((0,3), width=12, height=2, facecolor='white', edgecolor='grey')
c = patch.Rectangle((0,5), width=12, height=2, facecolor='#FF9933', edgecolor='grey')
m,n= py.subplots()
n.add_patch(a)