Skip to content

Instantly share code, notes, and snippets.

View stakemepro's full-sized avatar
🏠
Working from home

STAKEME stakemepro

🏠
Working from home
View GitHub Profile
@stakemepro
stakemepro / set-ports-node.js
Last active September 18, 2023 01:03
Auto set free port in cosmos node
const shell = require("shelljs");
const TOKEN = process.argv[2];
const CONFIG = process.argv[3];
function openPort(port) {
return shell.exec(`sudo lsof -Pi :${port} -sTCP:LISTEN`, {shell: '/bin/bash', silent: true}).code !== 0;
}
for (let i = 0; i < 60; i++) {