Skip to content

Instantly share code, notes, and snippets.

View bayramlcm's full-sized avatar
👨‍💻

Bayram ALAÇAM bayramlcm

👨‍💻
View GitHub Profile
@bayramlcm
bayramlcm / ethers-app.js
Created June 14, 2024 08:09
Ethereum Wallet Utilities with ethers
const { ethers } = require("ethers");
// Function to create a random wallet
async function createRandomWallet() {
const wallet = ethers.Wallet.createRandom();
const address = wallet.address;
const privateKey = wallet.privateKey;
const mnemonic = wallet.mnemonic.phrase;
console.log(`Address: ${address}`);
@bayramlcm
bayramlcm / port-forward.sh
Created May 7, 2024 08:28
RHEL Port Forward
# PORT Forward Create
sudo iptables -t nat -A PREROUTING -p tcp --dport {PORT} -j DNAT --to-destination {HOST}
sudo iptables -t nat -A POSTROUTING -j MASQUERADE
sudo sysctl -w net.ipv4.ip_forward=1
sudo firewall-cmd --zone=public --add-port={PUBLIC_PORT}/tcp --permanent
sudo firewall-cmd --reload
# PORT Forward Delete