Skip to content

Instantly share code, notes, and snippets.

View oboxodo's full-sized avatar

Diego Algorta oboxodo

View GitHub Profile
@oboxodo
oboxodo / main.rb
Last active January 23, 2023 00:13 — forked from coorasse/main.rb
CanCanCan Issue
# This file serves the purpose of starting a discussion on CanCanCan to try and
# avoid instantiating in memory a lot of uneeded objects when calling `can?`.
# I think in many cases it should be possible to leverage `accessible_by` to
# resolve the ability using an optimized SQL query instead.
# This file started life as a copy of https://gist.github.com/coorasse/3f00f536563249125a37e15a1652648c
begin
require 'bundler/inline'
rescue LoadError => e
@oboxodo
oboxodo / MetaplexDisplay.md
Created October 17, 2021 03:54
Steps for Metaplex NFT Display

So you want to display a Metaplex NFT

This guide will attempt to give an overview of the technical/coding steps that are required to render a Metaplex NFT with any programming language/platform. I'll attempt to write it a programming language-agnostic manner; you'll need to fill in the particular methods of performing the steps with your coding language of choice.

For the purposes of discussion, we'll call the Solana account that holds the Metaplex NFTs the "NFT-Account."

Step 1: Call getTokenAccountsByOwner

The first thing you need to do is call the getTokenAccountsByOwner JSON RPC method as documented here: