Skip to content

Instantly share code, notes, and snippets.

View brianorwhatever's full-sized avatar
🕊️
nesting

Brian Richter brianorwhatever

🕊️
nesting
View GitHub Profile
0xaCF0834B453E5418aF7C6801049e7bE592b35915

Keybase proof

I hereby claim:

  • I am brianorwhatever on github.
  • I am brianorwhatever (https://keybase.io/brianorwhatever) on keybase.
  • I have a public key ASAQtZBaHaaBZN4QMizpsqFSEEfbbvm4zhlPwbSY5shpdwo

To claim this, I am signing this object:

{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://w3id.org/security/bbs/v1",
"http://schema.org/"
],
"type": [
"VerifiableCredential"
],
"id": "http://aviary.one/123",
@brianorwhatever
brianorwhatever / aip-2-present-proof.json
Last active February 15, 2022 19:20
ACA-Py /present-proof-2.0/create-request JSON Schema
{
"type": "object",
"required": ["presentation_request"],
"properties": {
"trace": {
"type": "boolean",
"example": false,
"title": "Whether to trace event (default false)"
},
"comment": {
@brianorwhatever
brianorwhatever / ods-theme.puml
Last active March 2, 2022 07:45
ods-theme.puml
''
'' materia theme based off of the bootstrap theme of the same name
'' https://bootswatch.com/materia/
''
'' Author: Brett Schwarz
'' Copyright (c) 2019 by Brett Schwarz
!$THEME = "materia-outline"
!if %not(%variable_exists("$BGCOLOR"))
@brianorwhatever
brianorwhatever / feedToJson.ts
Last active February 12, 2023 10:38
converts ordinal feed.xml to json objects
import convert from 'xml-js';
import cheerio from 'cheerio';
const feed = await (await fetch(`${env.ORD_API}/feed.xml`)).text();
const feedjson = JSON.parse(convert.xml2json(feed, { compact: true, spaces: 4 }))
const inscriptions = feedjson.rss.channel.item;
let inscriptionObjects: any[] = [];
for (let i = 0; i < inscriptions.length; i++) {
const inscription = await (await fetch(`${env.ORD_API}${inscriptions[i].link._text}`)).text()
const $ = cheerio.load(inscription);
@brianorwhatever
brianorwhatever / insertCollectibleImages.js
Last active March 23, 2023 05:34
Decode & Insert VerifiableCollectible Images
function insertCollectibleImageBeforePreTags() {
// Find all <pre> tags in the document
const preTags = document.querySelectorAll('pre');
if (preTags.length === 0) {
console.error('No <pre> tags found in the document.');
return;
}
preTags.forEach((preTag) => {
{
"@context": [
"https://www.w3.org/2018/credentials/v1",
"https://purl.imsglobal.org/spec/ob/v3p0/context.json",
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"id": "urn:uuid:63c8140b-1b77-4c39-babc-825e4cfd69ba",
"type": [
"VerifiableCredential",
"OpenBadgeCredential"