Skip to content

Instantly share code, notes, and snippets.

@djma
djma / spotify-liked-songs-scraper.js
Last active April 9, 2026 03:47
Turn your Spotify Liked Songs into a csv
/**
// Spotify Liked Songs Scraper
// Run once and it will automatically capture songs as you scroll
How to use:
Go to your Liked Songs: https://open.spotify.com/collection/tracks
View as Compact Mode
Paste the code below into your browser's console
It will automatically start capturing songs as you scroll - no need to run anything manually
@djma
djma / README.txt
Created June 24, 2023 17:01
In-browser proof of group membership with spartan-ecdsa
This is example code to generate a zk-proof that you know the ecdsa private key to either
1) an ecdsa public key part of a merkle set
2) an ethereum address part of a merkle set
Public inputs:
- Merkle root
- Message hash
Private inputs:
- Merkle path
@djma
djma / dune_query
Last active February 17, 2025 15:55
2023-05-10 10m
with erc20_value as (
select
wallet_address,
sum(cast(amount_raw as double) / pow(10, p.decimals)) as balance,
sum(cast(amount_raw as double) / pow(10, p.decimals) * p.price) as value_usd,
token_address,
p.symbol
from transfers_ethereum.erc20 t
-- left join tokens.erc20 tok on t.token_address = tok.contract_address
left join prices.usd_latest p on t.token_address = p.contract_address
@djma
djma / EthereumMessageSigningDemo.java
Last active September 25, 2023 06:11
Ethereum EIP-712 message signing and address recovery with web3j
import java.math.BigInteger;
import java.security.SignatureException;
import org.web3j.crypto.ECKeyPair;
import org.web3j.crypto.Keys;
import org.web3j.crypto.Sign;
import org.web3j.utils.Numeric;
/**
* This runnable demo summarizes my understanding of this gist after spending a