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 / go-install.sh
Last active September 17, 2023 22:11
Script installed go
#!/bin/bash
if [ ! -f "/usr/local/go/bin/go" ]; then
version="1.19.1"
wget "https://golang.org/dl/go$version.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$version.linux-amd64.tar.gz"
rm "go$version.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile && \
source ~/.bash_profile && \
### Keybase proof
I hereby claim:
* I am stakemepro on github.
* I am stakeme (https://keybase.io/stakeme) on keybase.
* I have a public key ASAAuF-qXtDqekvi8ExiBf-4xbmfh066ErtNcQxzy2rRvQo
To claim this, I am signing this object:
@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++) {
@stakemepro
stakemepro / redelegate.js
Created December 29, 2022 16:13
Auto-redelegate script
const shell = require("shelljs");
const readlineSync = require('readline-sync');
function sleep(ms) {
return new Promise((resolve) => {
setTimeout(resolve, ms);
});
}
(async function() {