Skip to content

Instantly share code, notes, and snippets.

View notcod's full-sized avatar
💭
I may be slow to respond.

notcod

💭
I may be slow to respond.
View GitHub Profile
@notcod
notcod / MINIMUM ETHEREUM WALLET GENERATOR PYTHON 3
Created July 31, 2021 09:20
MINIMUM ETHEREUM WALLET GENERATOR PYTHON 3
from operator import xor
from functools import reduce
from random import randrange
from web3.auto.infura import w3
from time import time
RoundConstants = [
0x0000000000000001, 0x0000000000008082, 0x800000000000808A, 0x8000000080008000,
0x000000000000808B, 0x0000000080000001, 0x8000000080008081, 0x8000000000008009,
@notcod
notcod / getPubKey.py
Created July 21, 2021 02:15 — forked from CrackerHax/getPubKey.py
Python script for getting ethereum public key from transaction id
import web3
w3 = web3.Web3(web3.HTTPProvider('https://geth.golem.network:55555'))
tx = w3.eth.getTransaction('0x00ee93fd1e6fdbdf841b4458a078210449dce89525502c965fd3534ba397e2e3')
tx.hash
from eth_account._utils.signing import extract_chain_id, to_standard_v
s = w3.eth.account._keys.Signature(vrs=(
to_standard_v(extract_chain_id(tx.v)[1]),
w3.toInt(tx.r),
@notcod
notcod / node_nginx_ssl.md
Created February 28, 2021 04:25 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

<?php
// Get array of all source files
$files = scandir("source");
// Identify directories
$source = "source/";
$destination = "destination/";
// Cycle through all source files
foreach ($files as $file) {
if (in_array($file, array(".",".."))) continue;