Skip to content

Instantly share code, notes, and snippets.

const fs = require('fs');
const path = require('path');
const envFilePath = path.resolve(__dirname, '.env');
// Function to read the .env file and return its content as an array of lines
function readEnvFile() {
return fs.readFileSync(envFilePath, 'utf8').split('\n');
}
@GJivan
GJivan / pingWithTimestamp.bat
Created January 17, 2022 23:19
Ping Bat Script with TimeStamp
@echo off
Rem ######## Replace Log File Location ##########
set logfile=logFile1.txt
echo.
set /p IP="Enter IP Address to ping: "
echo.
echo.
set /p INTERVAL="Enter time (in seconds) to wait between pings: "