Skip to content

Instantly share code, notes, and snippets.

View elocremarc's full-sized avatar
😈

Eloc elocremarc

😈
View GitHub Profile
@elocremarc
elocremarc / parsesats.js
Last active November 4, 2023 00:26
Script to parse short sat names off the end of sats in your UTXO.
/**
* parsesats.js
*
* This script is used to parse short sat names from a UTXO output it scrapes the explorer html
*
* Command usage:
* node parsesats.js [output] [name] [host]
*
* [output]: The UTXO
* [name]: The name short names like 4 charcters are pretty common. Must be less than 11 characters.
@elocremarc
elocremarc / first_inscription.sh
Created August 29, 2023 03:02
Shell script to find first inscription in a block.
#!/bin/bash
# Check if jq is installed
if ! command -v jq &> /dev/null
then
echo "Error: jq could not be found. Please install it and try again."
exit 1
fi
# Check if a parameter was provided
/*
Project File Structure:
/myproject
|-- /node_modules
|-- /Generation
| |-- /Layers
| |-- /subDirectory1
| | |-- /compressed
| | |-- image1.png
@elocremarc
elocremarc / compress.js
Created June 25, 2023 06:49
Image compression need sharp as a dependency
const sharp = require('sharp');
const fs = require('fs');
const compressAndSaveImage = async (
inputImagePath,
outputImagePath,
maxWidth = 576,
maxHeight = 576,
quality = 10 // quality value for WebP format, from 0 to 100
) => {
{
"limit": 20,
"offset": 0,
"total": 11,
"results": [
{
"id": "9d567e6ef8bd6b13458cc67cc5e8339395a4433e45db4554ff83c88a5df8bae2i0",
"number": 11774132,
"address": "bc1pddt07pylwztawd7juvz6xxvh2weq8s6x04qyypgah5c8mavkhksqhpk248",
"genesis_address": "bc1pddt07pylwztawd7juvz6xxvh2weq8s6x04qyypgah5c8mavkhksqhpk248",
  OIP: TBD
  Layer: Ord Explorer
  Title: Allow Same Origin Inscription Page
  Author: Eloc elocremarc@gmail.com
  Status: Pending
  Created: 2023-05-04
  License: MIT
@elocremarc
elocremarc / CypherPunkGhostsMetadata.json
Created June 1, 2023 22:59
Cypherpunk Ghosts Metadata
[
{
"id": "61860d439a36956028381989bf1e5006af89e738e55625fe699bb64608fb14d3i0",
"meta": {
"name": "Cypherpunk Ghost #1",
"high_res_img_url": "https://ordinals.com/content/61860d439a36956028381989bf1e5006af89e738e55625fe699bb64608fb14d3i0",
"attributes": [
{
"trait_type": "Genesis",
"value": "Genesis Ghost"

C# in Unreal Engine for Video Game Development Cheatsheet

Setting up the project

  1. Install Unreal Engine
  2. Create a new project using the Unreal Engine launcher
  3. Select C++ as the project type and choose a template
  4. Open the project in the Unreal Editor
  5. In the Unreal Editor, go to Edit > Plugins and enable the C# plugin
@elocremarc
elocremarc / GPT-3_Script_Maker_CLI.MD
Last active February 15, 2023 00:03
Idea: GPT-3 Script Maker CLI

Idea: GPT-3 Script Maker CLI

  1. Define the CLI input concisely, specifying the script's purpose in a single file.

  2. Generate the script and necessary files for the project (in this case, package.json or dependency files for a JavaScript project) and output them to the CLI.

  3. Write the generated files to disk and commit them to version control.

  4. Run the script and take any output or user input to generate a new response, addressing any issues or additional information presented by the console log.

@elocremarc
elocremarc / GPT3-Dall-E-2-MashUp.js
Last active January 22, 2023 21:53
GPT-3 creates a story and image prompts and outputs in JSON. The image prompt is then used to generate an Image in DALL-E 2
const { Configuration, OpenAIApi } = require('openai');
const configuration = new Configuration({
apiKey: 'YOUR_API_KEY',
});
const openAi = new OpenAIApi(configuration);
const CreatePrompt = (prompt) => {
const exampleResponse = JSON.stringify([
{