Skip to content

Instantly share code, notes, and snippets.

@dougpfeffer
dougpfeffer / snapshot.rb
Last active March 1, 2023 10:19
NFT Collection Snapshot Generate with Moralis
# Requires a Moralis API key.
# Writes out lists of owners of each token of each contract listed in the `CONTRACTS` array.
# Doesn't work on OpenSea contracts.
require 'net/http'
require 'uri'
require 'json'
MORALIS_API_KEY = ''
@dougpfeffer
dougpfeffer / README.txt
Created February 21, 2022 02:37
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.8.10+commit.fc410830.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads for the very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS
@dougpfeffer
dougpfeffer / hangouts_backbone.js
Created May 24, 2012 21:57
Hangouts/Backbone.js integration bit
// Fired off by the gadget manager, starts up our app by hooking it into the hangout loading process.
function init() {
gapi.hangout.onApiReady.add(
function (eventObj) {
if (eventObj.isApiReady) {
// Are we the admin?
var currentParticipants = gapi.hangout.getParticipants();
if (currentParticipants.length == 1) {