Skip to content

Instantly share code, notes, and snippets.

View elocremarc's full-sized avatar
😈

Eloc elocremarc

😈
View GitHub Profile
@elocremarc
elocremarc / cursor-eyes.ts
Created January 5, 2025 10:36
A Bun script that gives Cursor AI "eyes" by capturing Chrome screenshots and console logs, helping it understand and debug frontend visual states during development.
import puppeteer from 'puppeteer-core';
import fs from 'fs';
import path from 'path';
// Ensure directories exist
const dirs = ['screencaps', 'logs'];
for (const dir of dirs) {
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir);
}
@elocremarc
elocremarc / OrdinalsContextPrompt.md
Last active September 25, 2024 04:36
Ordinals Context AI Prompt. A compilation of the ordinals docs for use to give AI chatbots and Agents context on how to create html ordinal inscriptions. This prompt will probably be outdated and is just a reference for how you can build your own prompts. You should maintain your own copy of the docs in your own projects

Inscriptions

Inscriptions inscribe sats with arbitrary content, creating bitcoin-native digital artifacts, more commonly known as NFTs. Inscriptions do not require a sidechain or separate token.

These inscribed sats can then be transferred using bitcoin transactions, sent to bitcoin addresses, and held in bitcoin UTXOs. These transactions, addresses, and UTXOs are normal bitcoin transactions, addresses, and UTXOS in all respects, with the exception that in order to send individual sats,

This file has been truncated, but you can view the full file.
[
{
"id": "b10b00bfb146fee3e86d6cbd8e8c954c485da41be480c0b21a6a63de7986892bi0",
"meta": {
"name": "Blob #1",
"attributes": [
{
"trait_type": "Blob Buddies",
"value": "1"
},
This file has been truncated, but you can view the full file.
[
{
"id": "b10b00bfb146fee3e86d6cbd8e8c954c485da41be480c0b21a6a63de7986892bi0",
"meta": {
"name": "Blob #1",
"attributes": [
{
"trait_type": "Blob Buddies",
"value": 1
},
@elocremarc
elocremarc / mardown-vewier.html
Created March 2, 2024 22:57
Markdown viewer inscription. Pass the id of a markdown file as a query param key id and it will render markdown styled based on the css.
<!doctype html>
<html lang=en >
<head>
<meta charset=utf-8>
<script type=module defer>
const urlParams = new URLSearchParams(window.location.search);
let id = urlParams.get('id');
import { marked } from '/content/cf7ef67632861da5a59a716ad5ee398054f455c0011a7b6aa12c5985c1b8b0b8i0'
const inscription = document.documentElement.dataset.inscription;
{
"Title": "OP_CAT",
"Description": "I heard about this thing called OP_CAT and I thought the story sounded cool.",
"Creator": "Jonathan Mann",
"Song A Day": 5502,
"Attributes": [
{ "Date": "2024-01-24" },
{ "Location": "Hartford, CT Studio 3" },
{ "Topic": "Bitcoin" },
{ "Mood": "Excited" },
/**
* @title Recursive Endpoints
* @author Eloc
* @description Library for getting data off recursive endpoints
*/
import { decode } from "/content/cbor-x.mjs";
/**
* Retrieves the inscription ID from the current page's URL.
* Assumes the URL follows a structure like `/content/<id>` or `/preview/<id>`.
@elocremarc
elocremarc / Chunk-Video.js
Created January 10, 2024 04:11
Script to chunk video for inscribing past the 400kb limit on bitcoin
/**
* @title Video Chunker
* @author Eloc
* @license Creative Commons CC0 1.0 Universal (CC0 1.0) Public Domain Dedication
* This script is used to split a video file into chunks of a specified size.
*
* How to run the script:
* 1. Set the videoPath variable to the path of the input video file.
* 2. Set the chunkSize variable to the desired size of each chunk in bytes.
* 3. Set the outputPath variable to the directory where the chunks will be saved.
@elocremarc
elocremarc / Ordinal_Tester_Server.js
Last active January 13, 2024 03:05
A basic test server for bringing in inscription content that has already been inscribed as well as uninscribed files that your working on. Will work with all the recursive routes under the /r/ directory
/*
Test server for inscriptions
Requires bun javascript runtime
Uses your local ordinal server on http://localhost:80
run your ord server with:
> ord server
Could also use https://ordinals.com if you don't have your ord server running
replace the host with https://ordinals.com
It will return inscriptions already inscribed in the /content/ route as well as all recursive routes under /r/