Skip to content

Instantly share code, notes, and snippets.

View nazariyv's full-sized avatar
🔭
You study mathematics because it is the poetry of the universe

naz nazariyv

🔭
You study mathematics because it is the poetry of the universe
View GitHub Profile
@nazariyv
nazariyv / check.bash
Created October 28, 2020 20:04
[github ssh authentication] check if you sat it up correctly #git
@nazariyv
nazariyv / a.bash
Created October 28, 2020 20:07
[git never asks for username] #git
git config --global credential.helper store
pragma solidity >=0.6.0 <0.7.0;
contract YourContract {
event SetPurpose(address sender, string purpose);
event Deployed(address this);
string public purpose = "🛠 Programming Unstoppable Money";
constructor() public {
emit Deployed(address(this));
pragma solidity >=0.6.0 <0.7.0;
import "./YourContract.sol";
contract YourFactory {
event ContractDeployed(address sender, string purpose);
function newYourContract() public {
new YourContract();
}
const {
html,
render,
useState,
useEffect,
useLayoutEffect
} = await import('https://unpkg.com/htm/preact/standalone.module.js');
const {
@nazariyv
nazariyv / excess-bits.py
Last active March 29, 2021 00:21
ExcessBits
import matplotlib.pyplot as plt
import requests
import base64
import io
import matplotlib.image as mpimg
from PIL import Image
from io import BytesIO
import numpy as np
def grab_image(number: str):
@nazariyv
nazariyv / wsl-setup.md
Created April 5, 2021 18:59 — forked from imfing/wsl-setup.md
WSL + ZSH + Hyper Setup

My WSL Setup

A guide to setup your WSL with Hyper and zsh

Download & Install the WSL

  • Follow the very thorough instructions here

Get a prettier terminal

  • Download Hyper.js here - I went with the 'hyperblue' theme.
@nazariyv
nazariyv / create2.py
Last active June 6, 2021 20:23
Uniswap v2 Python CREATE2
# references
# 1. https://uniswap.org/docs/v2/javascript-SDK/getting-pair-addresses/
# 2. https://ethereum.stackexchange.com/questions/90539/how-to-get-the-non-packed-soliditykeccak-hash-in-python-web3
# deps
# Python 3.9.5
# 1. eth-abi==2.1.1
# 2. web3==5.18.0
@nazariyv
nazariyv / setup-ipfs-on-aws.txt
Created September 26, 2021 17:31
setup-ipfs-on-aws
The tutorials below explain how to start the IPFS node on AWS. Of note are the networking (the ports required to open) as well as
setting up the IPFS env var to persist the data:
https://medium.com/textileio/tutorial-setting-up-an-ipfs-peer-part-i-de48239d82e0
https://talk.fission.codes/t/a-loosely-written-guide-to-hosting-an-ipfs-node-on-aws/234
@nazariyv
nazariyv / crontab.txt
Created September 27, 2021 15:02
crontab quick tips
# https://crontab.guru/every-5-minutes
crontab -e
sudo service crond restart
sudo cat /var/log/cron