Skip to content

Instantly share code, notes, and snippets.

View pawiromitchel's full-sized avatar
🔥
By doing nothing, you become nothing

Mitchel pawiromitchel

🔥
By doing nothing, you become nothing
View GitHub Profile
@pawiromitchel
pawiromitchel / ws-web3js-subscribe.js
Created May 9, 2022 12:05
subscribe to pendingTransactions with web3js
const Web3 = require('web3');
const RPC = 'wss://xxxx';
const options = {
timeout: 30000, // ms
headers: {},
// Enable auto reconnection
reconnect: {
auto: true,
delay: 5000, // ms
maxAttempts: 5,
@pawiromitchel
pawiromitchel / interact.js
Created April 21, 2022 12:40
interact with a smart contract
const Contract = require('web3-eth-contract');
const url = `INFURA/QUICKNODE-API-ENDPOINT`;
Contract.setProvider(url);
let tokenAddress = "0x...";
let ABI = require('./ABI/erc20.json');
const contract = new Contract(ABI, tokenAddress);
contract.methods.totalSupply().call().then(console.log);
@pawiromitchel
pawiromitchel / docker-compose.yml
Created February 23, 2022 14:27
[mongodb docker image] #docker #mongodb
# https://hub.docker.com/_/mongo
version: '3.1'
services:
mongo:
image: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
@pawiromitchel
pawiromitchel / docker-compose.yml
Created February 20, 2022 23:47
[mysql + phpmyadmin] #mysql #docker
version: '3.1'
services:
db:
image: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test_db
ports:
- "3308:3306"
@pawiromitchel
pawiromitchel / docker-compose.yml
Created February 20, 2022 09:09
[postgresql + pgadmin docker file] #docker #postgres #pgadmin
version: '3.8'
services:
db:
container_name: pg_container
image: postgres
restart: always
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: test_db
@pawiromitchel
pawiromitchel / 3box.txt
Created September 23, 2021 23:59
3Box verification
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreidd26rha45uslfwbxbf2w4exmoxe3cbv4rh5rvikuseavcolyaslu ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@pawiromitchel
pawiromitchel / gnosis-safe-multisend-submitter.js
Created September 21, 2021 12:03 — forked from jjgonecrypto/gnosis-safe-multisend-submitter.js
Programmatically submit multiple transactions to a gnosis safe to be signed as one
// Extrapolated from https://github.com/gnosis/safe-core-sdk
const ethers = require('ethers');
const { EthersAdapter } = require('@gnosis.pm/safe-core-sdk');
const Safe = require('@gnosis.pm/safe-core-sdk').default;
const SafeServiceClient = require('@gnosis.pm/safe-service-client').default;
const providerUrl = '....';
@pawiromitchel
pawiromitchel / custom-blockui-div.md
Created August 31, 2021 12:58
Create a custom BlockUI component and reuse it
@pawiromitchel
pawiromitchel / server_solo.cfg
Created August 9, 2021 15:14
Insurgency solo server config
// Settings applied when starting a solo game through the menu.
// Steam\steamapps\common\insurgency2\insurgency\cfg
sv_lan 1
ins_bot_difficulty 3
mp_minteamplayers 1
mp_friendlyfire 1 // friendly fire
sv_nwi_banlist 0
sv_hud_deathmessages 1 // death messages
sv_hud_scoreboard_show_kd 1 // show k:d on scoreboard
sv_hud_targetindicator 0 // show friendly player names when looking at them
@pawiromitchel
pawiromitchel / copy_open_url.ahk
Created June 23, 2021 12:05
Autohotkey copy text and open in browser
^j::
clipboard := "" ; Start off empty to allow ClipWait to detect when the text has arrived.
Send ^c
ClipWait ; Wait for the clipboard to contain text.
Run chrome.exe %clipboard%
return