Skip to content

Instantly share code, notes, and snippets.

@rollue
rollue / MetaplexDisplay.md
Created September 2, 2021 17:55
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:

@johnpm-12
johnpm-12 / eip-2612-ethers.ts
Last active August 7, 2022 21:14
EIP-2612 ethers example
import { BigNumberish, Signature, utils, providers, Contract } from "ethers";
// this is designed to work with USDC
export async function signPermit(
signer: providers.JsonRpcSigner,
token: Contract,
chainId: BigNumberish,
spender: string,
value: BigNumberish,
deadline: BigNumberish
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active October 10, 2025 05:02
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@jefftriplett
jefftriplett / python-django-postgres-ci.yml
Last active June 23, 2025 06:00
This is a good starting point for getting Python, Django, Postgres running as a service, pytest, black, and pip caching rolling with GitHub Actions.
name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
services:
@luvpreetsingh
luvpreetsingh / Dockerfile
Created July 2, 2019 19:59
Dockerfile for django applications
# syntax=docker/dockerfile:1.0.0-experimental
# The above comment is not to be deleted, its necessary. We are using an experimental feature and above line is important to enable that
# please refer to this, https://medium.com/@tonistiigi/build-secrets-and-ssh-forwarding-in-docker-18-09-ae8161d066 to know more about this
# before building docker image using this dockerfile, please do export DOCKER_BUILDKIT=1
FROM python:3.6-alpine
ENV PYTHONUNBUFFERED 1
@alexdebrie
alexdebrie / README.md
Created February 1, 2019 01:59
Using boto3 generate_presigned_post()

Using an S3 presigned POST url.

  1. Copy the generate.py script to your machine.

  2. Update the BUCKET_NAME and KEY_NAME values in the script as needed.

  3. Run python generate.py. It will spit some output like the following:

$ python3 generate.py

@zzerjae
zzerjae / index.js
Last active March 9, 2021 11:51
sample code - Resizing Images with Amazon CloudFront & Lambda@Edge
'use strict';
const querystring = require('querystring');
const aws = require('aws-sdk');
const s3 = new aws.S3({
region: 'ap-northeast-2',
signatureVersion: 'v4'
});
const sharp = require('sharp');

Preface

This article walks you through an example of deploying a Python 3.6 application that uses Pandas and AWS S3 on AWS Lambda using Boto3 in Python in 2018. No shell, no bash, no web console, everything is automated in Python. The previous article of a Hello World example can be found here.

Again, the reason to use Python Boto3 to interact with AWS is that,

  1. I'm more familiar with Python than Bash, which means a Python script can be more flexible and powerful than Bash for me.
  2. I'm not a fun of the AWS web console. It might be easier to do certain things, but it is definitely not automated.

Introduction

@chimmelb
chimmelb / chromiumpackages.config
Last active June 7, 2024 14:55
.ebextensions config file to load NodeJS EB instance with packages needed for Puppeteer/Chromium
# This is for ElasticBeanstalk with Amazon Linux 2023. For previous Linux 2 or Linux 1, see revisions for ideas
packages:
yum:
cups-libs: []
libdrm: []
libXdamage: []
libXfixes: []
libXrandr: []
mesa-libgbm: []
libxkbcommon: []
@xiaket
xiaket / lifecycle_policy.json
Last active November 15, 2024 09:58
ECR Lifecycle Policy example with explanations
{
"rules": [
{
"rulePriority": 10,
"description": "For `latest` tag, keep last 5 images",
"selection": {
"tagStatus": "tagged",
"tagPrefixList": ["latest"],
"countType": "imageCountMoreThan",
"countNumber": 5