Skip to content

Instantly share code, notes, and snippets.

@zhongfu
zhongfu / lobsters_owners.csv
Created October 11, 2021 11:35
lobsterdao nft owners + counts per address as of 2021-10-11 11:30 utc
address count
0xc92A0A71122054F83c8fbdADE123385Aa259C779 120
0x93BA4aB2F32c1462A7e7603707F73FBBeA2AA698 75
0x81714b9d10d642F70b9b199c06054488101416aD 30
0x8d138c01765483cB79d787ce5933F609CbFDabcF 28
0x0C3d030eE625b3135Fdc9C1CE0598b51c37262ee 25
0x24F700BBa64905C97dD9F1cAc3DAcA8BA81f0285 23
0x3bc482b13EAf5C69D16a257584cF75b5Ea82604a 23
0x964b25d3FF75e9566063462262B2898D4d1B3Aa4 21
0x0087a081a9B430fd8f688c6ac5dD24421BfB060D 21
@zhongfu
zhongfu / nft_owners.py
Last active September 3, 2022 06:42
dumps a csv of owners of an nft collection (with sequential ids), and how many nfts they own
#!/usr/bin/env python3.8
import brownie
from brownie import Contract
import csv
def main():
brownie.network.connect('mainnet')
# lobsterdao, or plop your contract addr here
nft_contract = Contract('0x026224a2940bfe258d0dbe947919b62fe321f042')
@zhongfu
zhongfu / README.md
Last active October 21, 2021 00:44
lobsterdao chat stats

how do I use this crap?

  • open up tdesktop (ie the Telegram desktop client)
  • go to your favorite group
  • export all messages as json -- you can skip all media
  • head to wherever tdesktop downloaded it to -- maybe Downloads/ChatExport_yyyy-mm-dd/
  • run generate.py there
  • optionally: weep a little
@zhongfu
zhongfu / add-grafana-tag-filter.jq
Created June 20, 2021 13:03
jq script to add a tag filter to every single panel (used for geth dashboard); assumes each panel already has at least one tag filter
# '.panels[1].targets[0].tags |= map(select(.key == "chain" | not)) | .panels[1].targets[0].tags += ["swag"]'
def update_tags:
.tags |= map(select(.key == "chain" | not)) | .tags += [{"condition": "AND", "key": "chain", "operator": "=~", "value": "/^$chain$/"}];
def update_targets:
.targets |= map(if has("tags") then (. | update_tags) else . end);
.panels |= map(if has("targets") then (. | update_targets) else . end)
@zhongfu
zhongfu / openpgp.txt
Created January 25, 2016 15:53
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:eef16f934ec3a3431ab17dfdf54e62f05819e33f]
@zhongfu
zhongfu / keybase.md
Created June 13, 2015 05:33
Keybase proof (keybase.io/zhongfu)

Keybase proof

I hereby claim:

  • I am zhongfu on github.
  • I am zhongfu (https://keybase.io/zhongfu) on keybase.
  • I have a public key whose fingerprint is EEF1 6F93 4EC3 A343 1AB1 7DFD F54E 62F0 5819 E33F

To claim this, I am signing this object:

@zhongfu
zhongfu / SSH pubkey
Last active December 18, 2015 12:18
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCxiY996chyFOT8PSQmxPDgd2bMx6AyJen5b6Lh3OqfW2S23NHmtqyRVz/OZNxrKy2R8inrHNsoqmQoQT63jbM8Qbow5tzj2GILTYlNz4W4F2GsJCZwmCopn3zjo5CMfE7kaSbB1yDInSIiqZjI91tVAKtbdXk58MEfmBlLzeFQDBD0aA4hpooxpmdjWjSyOpg5hgSLe2m1tCMJHY6EUnRzlPA4LsUAiOYVeM8gQd7LXsw2USj1xVo9agH5/cg/89CjsM/lLu/vOX0oBmMDruz07o/x9xVNZ4RCmK+z5JddPhtG2Pd4fGlA9Vtd+Z4LNnrPbterlrznozXVabwhWZsAx+9UDBXHpNEVblfw0eXglZdr8mUQhA/oi2w4EYkg2nb9/36OTNKKPhdiDef7BzQ8ntyOLtTlvqKN91+kFsrUMVayxWiHA9uYMUODfdjQfaqDLtuRzd/hNSP4CTtrBGwX/buNoW5mGne6/AdR2BvcRPaFZ7ADv2Pt2FYnRIj1Vxsjy0WJnfKLeHJTG5uW16ZT2jLEy+3tz7L3SFQtTFbMjMqWJ61yVGcs8IJiQNrtitfWuQ4M/4dDY/Dw+vdYRGvgGoiOSpykH4hmXWfNk5T/GS1QGUDoWEaWZSaBjKGoZSpDSqrc6LP64eGJcBPvuqXxjnotNRe/HFJ0fQBv0g3mGw== zhongfu@zLaptop