Skip to content

Instantly share code, notes, and snippets.

View TanjinAlam's full-sized avatar

Md Tanjin Alam TanjinAlam

View GitHub Profile
{
"_id" : ObjectId("68a6ae2d6e2b9ed1415eb72a"),
"filePath" : "resources/js/components/Onboarding/OnboardingPlans.vue",
"lineStart" : NumberInt(118),
"lineEnd" : NumberInt(147),
"content" : "**Issue**: Function getButtonLabel() has complex conditional logic but doesn't return a default value, which could result in undefined button text.\n\n**Suggestion**: Add a default return value to ensure the button always has text:\n\n```\nfunction getButtonLabel() {\n if (\n props.hasActiveSubscription &&\n props.currentPlan &&\n !props.currentPlan?.is_plan_for_advertising\n ) {\n if (\n props.currentPlan?.interval === 'monthly' &&\n props.stripeMeta.plan.interval === 'yearly'\n ) {\n return 'Upgrade'\n }\n if (\n props.currentPlan?.interval === 'yearly' &&\n props.stripeMeta.plan.interval === 'monthly'\n ) {\n return 'Downgrade'\n }\n if (\n Number(props.currentPlan?.price || 0) <\n Number(props.stripeMeta.plan.price)\n ) {\n
# Time: 2025-05-01T05:55:40.192599Z
# User@Host: shukhee_prod_user[shukhee_prod_user] @ [10.0.54.117] Id: 846832
# Query_time: 183.172190 Lock_time: 0.000004 Rows_sent: 10 Rows_examined: 12014129
SET timestamp=1746078757;
SELECT DISTINCT `distinctAlias`.`PatientPackage_id` AS `ids_PatientPackage_id`, `distinctAlias`.`PatientPackage_createdAt` FROM (SELECT `PatientPackage`.`id` AS `PatientPackage_id`, `PatientPackage`.`uuid` AS `PatientPackage_uuid`, `PatientPackage`.`createdAt` AS `PatientPackage_createdAt`, `PatientPackage`.`updatedAt` AS `PatientPackage_updatedAt`, `PatientPackage`.`name` AS `PatientPackage_name`, `PatientPackage`.`packageType` AS `PatientPackage_packageType`, `PatientPackage`.`description` AS `PatientPackage_description`, `PatientPackage`.`terms` AS `PatientPackage_terms`, `PatientPackage`.`userNumber` AS `PatientPackage_userNumber`, `PatientPackage`.`timePeriod` AS `PatientPackage_timePeriod`, `PatientPackage`.`price` AS `PatientPackage_price`, `PatientPackage`.`status` AS `PatientP
@Get('patient-package/:patientPackageId')
@UseGuards(AuthGuard, RolesGuard)
@UseInterceptors(ResponseInterceptor)
@Roles(UserTypes.ADMIN, UserTypes.AGENT, UserTypes.PATIENT, UserTypes.SSKUSER)
async getPatientSubscriptionPackage(
@Req() req: any,
@Param('patientPackageId') patientPackageId: string,
) {
return {
message: 'Patient subscription package details',
#!/bin/bash
# Configuration
SERVICE_URL="http://127.0.0.1:3000"
LOG_FILE="/var/log/nodejs-health.log"
WARNING_FILE="/var/log/nodejs-warnings.log"
# Function to log messages
log_message() {
local timestamp=$(date '+%Y-%m-%d %H:%M:%S')
#!/bin/bash
# setup.sh - Main setup script
exec > >(tee /var/log/setup.log) 2>&1
echo "Starting Node.js application setup..."
# Update system and install dependencies
apt-get update
apt-get upgrade -y
apt-get install -y netcat-openbsd mysql-client
@TanjinAlam
TanjinAlam / docker-compose.yml
Created February 17, 2024 10:30 — forked from ftmoose/docker-compose.yml
MongoDB ReplicaSet Docker Configuration
version: "3.1"
# Our containers
services:
# Temporary container used to initialize the replica set
mongo-setup:
container_name: mongo-setup
image: mongo
restart: on-failure
networks:
@TanjinAlam
TanjinAlam / ibftConfigFile.json
Last active May 31, 2023 12:00
ibftConfigFile.json
{
"genesis": {
"config": {
"chainId": 14333,
"berlinBlock": 0,
"ibft2": {
"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 4
}
@TanjinAlam
TanjinAlam / zkp-factor-factor-9.txt
Last active April 19, 2023 19:05
zkp-factor of 9
pragma circom 2.0.0;
include "/usr/local/lib/node_modules/circomlib/circuits/comparators.circom";
template FactorCircuit() {
signal input a;
signal output isFactor;
// Constraint to ensure that a are factors of 9
signal temp;
@TanjinAlam
TanjinAlam / cbdc
Created January 19, 2023 10:25
pubkey
CONTRACT_ADDRESS_BDTOKEN=0x389cACE1478ad58245c04BE6ae47b9EdC7881515
Validator1_pubkey=0x8F1f90DCf24b532e3580998E78fdc5224f94307E
Validator1_privkey="12c97ce3557d01b69b4a7398a2ae8fa0b52181392fa52b8ba90905c2f1336234"
SIGNER=0xf2F4E1205B7Ac806847D7F50FbFed8469656688B
PKEY="c506cbbc39ff6ceb48c9d42d46026f2fb87a596232f7cf90c240478dbc14fd31"
#!python3
import hashlib
import math
import sys
from base64 import b64decode, b64encode
prooffile = "proof.txt" # File where Merkle proof will be written.
MAXHEIGHT = 20 # Max height of Merkle tree