PostgresQL Cheatsheet
tags: PostgresQL, Cheatsheet Create User and Role Docs: Examples of Create Role CREATE ROLE whoami WITH LOGIN PASSWORD 'P@ssw0rd'; Create Database Docs: Examples of Create Database CREATE DATABASE sales OWNER whoami;
tags: PostgresQL, Cheatsheet Create User and Role Docs: Examples of Create Role CREATE ROLE whoami WITH LOGIN PASSWORD 'P@ssw0rd'; Create Database Docs: Examples of Create Database CREATE DATABASE sales OWNER whoami;
tags: GPG, GnuPG Agent,Cheatsheet Stop GPG Agent gpg-connect-agent killagent /bye obsolete option “write-env-file” - it has no effect set -gx GPG_TTY (tty) set -gx SSH_AUTH_SOCK (gpgconf --list-dirs agent-ssh-socket) gpgconf --launch gpg-agent
tags: DeFi, Blockchain, Uniswap, Uniswap V3 I need derive price from decentralized exchanges, and I have finished some research about Uniswap v3. It’s brand new for me, and after that I want to share some ideas about DeFi, and I think it would be helpful for you to understand Uniswap and some other decentralized exchanges. DeFi from Scratch We exchange stuffs very often, and we can exchange tokens in a centralized exchange. For example, Alice owns some ETH, and Bob owns some DAI. Now, Alice want to swap some ETH for DAI, and Bob want to swap some DAI for ETH. How could they do? ...
tags: Uniswap V3 source: Shao, 田少谷. “Uniswap v3 Features Explained in Depth.” Taipei Ethereum Meetup (blog), July 20, 2021. https://medium.com/taipei-ethereum-meetup/uniswap-v3-features-explained-in-depth-178cfe45f223. Tick is a price range Each tick is a price range with upper bound and lower bound. Tick price from index: \(p(i) = 1.0001 ^ i\) 1.0001 ** 138162 # 999_998 Tick index from price: \(log_{1.0001}p\) import math math.log(1000_000, base=1.0001) # 138162.01321981344
tags: Uniswap The Graph: Uniswap V3 Subgraph