Skip to content

Instantly share code, notes, and snippets.

View cyproto's full-sized avatar
🙃
What's happening? No clue.

Yash cyproto

🙃
What's happening? No clue.
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Happy 1 Year Anniversary!</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@300&family=Tsukimi+Rounded:wght@700&display=swap" rel="stylesheet">
<style>
body {
margin: 0;
This scenario first needs to be analyzed properly there can be many things that can cause such issues, a few of them are as follows.
Q: Clients are clicking on send OTP even if they are receiving the OTP and because of that, the service is getting called for no reason.
A: If this is the case implementation of a timer to send OTP will be better, once they click on send OTP, an incremental timer can be implemented.
Q: There might be an issue with receiving the message for OTP because of which that service is being called multiple times.
A: Here the validation API needs to be validated properly and thoroughly tested.
Q: Need to check if there is anything wrong with the UI if that is giving the service numerous calls.
A: Just in case there are any memory leaks because of async implementation and the service is getting called in a loop continuously.
apps:
- script: './app.js'
exec_mode: 'fork'
name: 'worker-0'
env:
PORT: 3500
NODE_ENV: production
- script: './app.js'
exec_mode: 'fork'
name: 'worker-1'
upstream loadbalancer {
least_conn;
server localhost:3500;
server localhost:3501;
}
server {
server_name example.com www.example.com;
index index.html;
window.prompt("Copy to clipboard: Command+C, Enter", (Object.keys(sessionStorage).map(key => JSON.parse(sessionStorage[key])['access_token'])).filter(i => i)[0].replaceAll('"', ""));
"scripts": {
...,
"deploy": "aws - region region-here - profile profile-here s3 sync ./dist s3://bucket-name"
},
{
"Version": "2012–10–17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::bucket-name/*"
}
{
"production": {
"aws_region": "ap-south-1",
"django_settings": "awsugnsk.settings",
"profile_name": "default",
"project_name": "awsugnsk-web-backend",
"runtime": "python3.8",
"s3_bucket": "bucket_name"
}
}
TEMPLATES = [{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [BASE_DIR / 'templates'],
'OPTIONS': {
'loaders': [
('django.template.loaders.cached.Loader', [
'django.template.loaders.filesystem.Loader',
'django.template.loaders.app_directories.Loader',
'path.to.custom.Loader',
]),