Skip to content

Instantly share code, notes, and snippets.

@hoakbuilds
hoakbuilds / Solana
Created September 28, 2021 12:12
Solana dev resources
Guides / Walkthroughs
Intro to Programming on Solana
https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/
Development Tutorial by Solong
https://solongwallet.medium.com/solana-development-tutorial-things-you-should-know-before-structuring-your-code-807f0e2ee43
Intro to Anchor Framework
https://project-serum.github.io/anchor/getting-started/introduction.html
@grahamplata
grahamplata / CANDYMACHINE.md
Created September 27, 2021 16:01
A guide for myself for setting up metaplex candymachine and frontend boilerplate

Candy Machine Guide

Abridged guide of getting started with metaplex candy machine and exiled-apes frontend starter.

I wanted to capture this guide so I could quickly skip the boilerplate.

Table of Contents

@networkextension
networkextension / bless.txt
Created September 19, 2021 06:34
Mac OS X bless.txt
BLESS(8) BSD System Manager's Manual BLESS(8)
NAME
bless -- set volume bootability and startup disk options
SYNOPSIS
bless --help
bless --folder directory [--file file] [--bootinfo [file]]
[--bootefi [file]] [--label name | --labelfile file] [--setBoot]
@jamland
jamland / metaplex-candy-machine-help.md
Last active November 26, 2021 17:50
Metaplex Candy Machine help

@metaplex/cli aka Candy Machine Help

Format

  • Folder with files named from 0-1.png
  • JSON file with attributes, format
    • Array with indices matching images
    • Contains: title, description and array of traits ({"display_type":"number","trait_type":"generation","value":2})
@jamland
jamland / update item on candy machine.md
Created September 16, 2021 17:16
Update single item on Metaplex Candy Machine

Q: Say you upload a whole 10k set ahead of time then realize that you messed one up and want to fix the arweave data. Are you hosed, and just have to re-upload everything with a new CM?

A: Go to the temp file created by CM. Find the one is broken. Change arweave URL to new one which is not broken. Mark on-chain: true -> false. Re-run the upload command. Upload command will find the one is missing and reupload it.

x86_64-darwin paperless-ng
i686-linux gnome.gnome-panel
x86_64-linux lilypond
x86_64-linux arx-libertatis
aarch64-linux gnome.gnome-applets
aarch64-linux beetsExternalPlugins.extrafiles
x86_64-darwin python39Packages.diagrams
aarch64-linux optar
aarch64-linux solfege
i686-linux imagemagickBig
@dabit3
dabit3 / App.js
Last active November 16, 2022 05:46
Persisting a keypair for reading across clients
/*
* this file includes both a node.js script for creating a keypair
* as well as the client code for using it
*/
/* createKeypair.js */
const fs = require('fs')
const anchor = require("@project-serum/anchor");
const web3 = require('@solana/web3.js')
const account = anchor.web3.Keypair.generate();
curl http://api.mainnet-beta.solana.com -X POST -H "Content-Type: application/json" -d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getProgramAccounts",
"params": [
"cndyAnrLdpjq1Ssp1z8xxDsB8dxe7u4HL5Nxi2K5WXZ",
{
"encoding": "jsonParsed",
"filters": [ ]
}
interface CaslPermission {
action: PermissionAction;
subject: string;
condition?: PermissionCondition;
}
@Injectable()
export class CaslAbilityFactory {
constructor(private authoService: AuthzService) {}
async createForUser(user: User): Promise<AppAbility> {
const dbPermissions: Permission[] = await this.authoService.findAllPermissionsOfUser(user);
export interface PermissionCondition {}
@Entity("permissions")
export class Permission extends BaseEntity {
// define class attributes...
/**
* @param condition: {"departmentId": "${id}"}
* @param variables: {"id: 1"}
* @return condition after parse: {"departmentId": 1}
*/