Skip to content

Instantly share code, notes, and snippets.

View Xavier577's full-sized avatar
:octocat:
cooking

Joseph Tsegen Xavier577

:octocat:
cooking
View GitHub Profile
@aamishbaloch
aamishbaloch / remove_server_details.md
Last active February 13, 2024 14:18
Remove Server Details from Response Header - Nginx

Remove Server Details from Response Header - Nginx

Below mentioned method is used to hide or remove the NGIX details from the header of your http requests.

Install Nginx Extras

sudo apt-get update
sudo apt-get install nginx-extras

Remove Server Details

@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active July 25, 2024 06:56
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@LordGhostX
LordGhostX / validate_email.py
Last active August 13, 2023 17:09
RegEX to validate email
# validate email addresses
def validate_email(email):
pattern = r"(^(?!-|\.)([a-zA-Z0-9._%+-]+)@(?!-)[a-zA-Z0-9.-]+(?<=[a-zA-Z0-9])\.[a-zA-Z]{2,}$)"
if re.match(pattern, email):
return True
else:
return False
if __name__ == "__main__":