Skip to content

Instantly share code, notes, and snippets.

View cryppadotta's full-sized avatar

Dotta cryppadotta

View GitHub Profile
@cryppadotta
cryppadotta / concat-repo.sh
Last active July 10, 2024 16:36
concat-repo.sh
#!/bin/bash
# Check if the repository path is provided as an argument
if [ $# -eq 0 ]; then
echo "Please provide the path to the git repository as an argument."
exit 1
fi
repo_root="$1"
shift
@cryppadotta
cryppadotta / pick_option_chain.py
Last active March 29, 2023 20:09
PickOptionChain: Given a prompt, call an LLM to generate options and present the user with a terminal UI to pick from the options. The result is the option the user picked
"""
# PickOptionChain: Given a prompt, call an LLM to generate options and present the user with a terminal UI to pick from the options. The result is the option the user picked.
## Example:
```python
theme_query = "Let's create a poem. The first thing we need to do is pick a message or a theme. List out 8 themes and then ask the human to pick one of them"
llm = OpenAI(temperature=.7)
chain = PickOptionChain(llm=llm)
@cryppadotta
cryppadotta / safe-add-delegate.py
Created October 7, 2022 20:06 — forked from abarmat/safe-add-delegate.py
Add a delegate to a Gnosis Safe
import time
import requests
import click
from web3 import Web3
def create_message(delegate_address):
totp = int(time.time()) // 3600
return delegate_address + str(totp)
pragma solidity ^0.8.6;
contract SimpleStorage {
struct A {
uint256 id;
}
struct B {
A[] ids;
bool active;
}
Bitvargen
Kel
Chuck K
merlin
Tom
Retired Yield Farmer
poplovski
Nard
Blockomoco
JEEVES
@cryppadotta
cryppadotta / 0-sacred-flames.md
Last active February 7, 2023 16:24
Forgotten Runes Sacred Flames

Below is the official, final list of accounts that will be airdropped a Sacred Flame.

These addresses were generated from this Dune Analytics query.

The intention of the query is to give a flame to addresses that:

  • were one of the first 100 addresses to write in the Book of Lore or
  • are one of the longest-holding Wizard addresses
  • excluding Dotta & Elf
@cryppadotta
cryppadotta / README.md
Last active July 28, 2022 06:26
OpenSea Floor Price Depth

OpenSea Floor Depth Calculator

Find out how much ETH is required to move to a certain floor price.

yarn
./node_modules/.bin/ts-node floor-depth.ts --slug forgottenruneswizardscult

NOTE: OpenSea limits to 50 listings per page (:eyeroll:) so this takes an eternity (hours) to run

@cryppadotta
cryppadotta / apparate-wizards.sh
Last active September 1, 2021 15:38
Apparate
curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x0b8eb29d7a592023b5330fd9a93299bca2a9604aaa2494c87333fc56da50ec9e"],"id":67}' https://cloudflare-eth.com/ | jq -r '.result.input' | cut -c 139- | xxd --plain --reverse | head -n 297 > decoder.ts
npm init -y
npm install ethers@5.0.26 yargs@16.1.0 chalk@4.1.0 ora@5.3.0 ts-node@9.0.0 typescript@4.0.5 bson@4.4.0 sharp@0.28.3 parse-numeric-range@1.2.0 mkdirp@1.0.4 @types/yargs @types/node
./node_modules/.bin/ts-node ./decoder.ts --wizards "0-9,13,123"
@cryppadotta
cryppadotta / machine.js
Last active April 24, 2021 19:51
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@cryppadotta
cryppadotta / cryptoPortfolio.gs
Created April 23, 2021 03:11 — forked from sargonas/cryptoPortfolio.gs
crypto portfolio import for google sheets
/////////////////////////
//Section 1: Coin Value//
/////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////
//coin market value lookup (works for all coins, just pass a single coin symbol as a parameter)
function getCoinPriceBySymbol(symbol) {
var url = 'https://api.coinmarketcap.com/v1/ticker/';
var response = UrlFetchApp.fetch(url);
var json = JSON.parse(response.getContentText());