This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"genesis": { | |
"config": { | |
"chainId": 14333, | |
"berlinBlock": 0, | |
"ibft2": { | |
"blockperiodseconds": 2, | |
"epochlength": 30000, | |
"requesttimeoutseconds": 4 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CONTRACT_ADDRESS_BDTOKEN=0x389cACE1478ad58245c04BE6ae47b9EdC7881515 | |
Validator1_pubkey=0x8F1f90DCf24b532e3580998E78fdc5224f94307E | |
Validator1_privkey="12c97ce3557d01b69b4a7398a2ae8fa0b52181392fa52b8ba90905c2f1336234" | |
SIGNER=0xf2F4E1205B7Ac806847D7F50FbFed8469656688B | |
PKEY="c506cbbc39ff6ceb48c9d42d46026f2fb87a596232f7cf90c240478dbc14fd31" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetchLatestBlock = () => | |
fetch(`https://blockchain.info/q/latesthash?cors=true`) | |
.then(r => r.text()); | |
const fetchMerkleRootAndTransactions = block => | |
fetch(`https://blockchain.info/rawblock/${block}?cors=true`) | |
.then(r => r.json()) | |
.then(d => [d.mrkl_root, d.tx.map(t => t.hash)]); | |
const random = arr => |
NewerOlder