Skip to content

Instantly share code, notes, and snippets.

View fgao22's full-sized avatar
🏫

Fei Gao fgao22

🏫
View GitHub Profile
@fgao22
fgao22 / 1_Storage.sol
Created April 28, 2020 14:12
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.5.17+commit.d19bba13.js&optimize=false&gist=
pragma solidity >=0.4.22 <0.7.0;
/**
* @title Storage
* @dev Store & retreive value in a variable
*/
contract Storage {
uint256 number;
Suggested Git Workflow
All incoming code changes should (not enforced) be a on a separate branch, and a pull request (PR) should be opened from that branch against `master` branch.
Sample git commands:
1. checkout `master` branch
`git checkout master`

Keybase proof

I hereby claim:

  • I am fgao22 on github.
  • I am fgao (https://keybase.io/fgao) on keybase.
  • I have a public key ASA4D0PT5H66WrcSQMna4HkTYOeqxC_Hj6Xuai9wUPeN7Qo

To claim this, I am signing this object:

@fgao22
fgao22 / db_schema.py
Created April 2, 2018 14:20
A script that uses sqlalchemy to print out database schema graph
from sqlalchemy import MetaData
from sqlalchemy_schemadisplay import create_schema_graph
# create the pydot graph object by autoloading all tables via a bound metadata object
graph = create_schema_graph(metadata=MetaData('postgres://user:pwd@host/database'),
show_datatypes=False, # The image would get nasty big if we'd show the datatypes
show_indexes=False, # ditto for indexes
rankdir='LR', # From left to right (instead of top to bottom)
concentrate=False # Don't try to join the relation lines together
)