Skip to content

Instantly share code, notes, and snippets.

View Arachnid's full-sized avatar

Nick Johnson Arachnid

View GitHub Profile
library LZF {
function decompress(bytes memory compressed, bytes memory decompressed) internal {
uint ip;
uint in_end;
uint op;
assembly {
// OP points to the current output location in memory
op := add(decompressed, 32)
// IP actually points to 31 bytes before the desired location, so
// MLOADs work correctly
/**
* Base contract that all upgradeable contracts should use.
*
* Contracts implementing this interface are all called using delegatecall from
* a dispatcher. As a result, the _sizes and _dest variables are shared with the
* dispatcher contract, which allows the called contract to update these at will.
*
* _sizes is a map of function signatures to return value sizes. Due to EVM
* limitations, these need to be populated by the target contract, so the
* dispatcher knows how many bytes of data to return from called functions.
import bisect
class NFA(object):
EPSILON = object()
ANY = object()
def __init__(self, start_state):
self.transitions = {}
self.final_states = set()
self._start_state = start_state
@Arachnid
Arachnid / airdrop.sql
Last active November 6, 2023 04:26
BigQuery queries for generating ENS airdrop data
--- Generate `ens-manager.airdrop.ownership_extents`, recording start time, end time, name, and owner tuples. ---
SELECT
transaction_hash,
event,
id,
block_timestamp AS start_time,
LEAST(LEAD(block_timestamp, 1, TIMESTAMP "9999-12-31 23:59:59.999999 UTC") OVER (PARTITION BY id ORDER BY block_timestamp, log_index), LAST_VALUE(TIMESTAMP_ADD(timestamp "1970-01-01 00:00:00+00", INTERVAL expires SECOND) IGNORE NULLS) OVER (PARTITION BY id ORDER BY block_timestamp, log_index)) AS end_time,
LAST_VALUE(owner IGNORE NULLS) OVER (PARTITION BY id ORDER BY block_timestamp, log_index) AS owner,
FROM (
SELECT
address count
0xc669eaad75042be84daaf9b461b0e868b9ac1871 4208495
0x4983d36b1d178653b8511b84e3d92e511d83ee1a 2695834
0xd1dd82d1ded8f40c200b89455050e9c18d918504 1586939
0xb16a11abe403864ce3797196572f6045541fa483 699308
0x42c2b07062de15781a6098ba36eb72e0d3f30d83 633892
0x06b6a2d98a31f92daea8a7dbc5efaa9d20cf1b15 570600
0x5190157323c4515799bc603def4a9a0845f5265e 540361
0x4b3fcc7c5cb01f6fbf84dd4f053cae302d94a09a 540361
0xa77025daad3b83b5598eff4d738f942a73c21f2f 479129

Keybase proof

I hereby claim:

  • I am arachnid on github.
  • I am arachnid (https://keybase.io/arachnid) on keybase.
  • I have a public key whose fingerprint is 01D0 4A62 A925 E4E6 9297 0628 A9C0 6CE2 FF8B 0A48

To claim this, I am signing this object:

You are making a Choose Your Own Adventure story for me to play.

Present a list of choices of Choose Your Own Adventure story genres, and let me choose one or enter my own choice of genre. Wait for my response.

After choosing the genre give a list of themes and wait for a response, or let me choose my own theme.

You will give the story a title. You will begin by describing the character that I am playing, including my character's name, age, and appearance. Briefly describe the setting and world in which the story begins. Describe a tension, danger, or challenge that I must confront.

You are going to create a story one passage at a time. After each passage you will provide a numbered list of choices and wait for a response. Include one emoji for each choice.

include $(GOROOT)/src/Make.$(GOARCH)
TARG=kademlia
GOFILES=\
nodeid.go\
routingtable.go\
contact.go\
kademlia.go
include $(GOROOT)/src/Make.pkg

Total missed: 2

Total guesses: 6158

First guess: spend

aback

  • ⬜⬜🟩🟩🟩: quack

abate