Skip to content

Instantly share code, notes, and snippets.

BOUNDING_BOX_TOOL_NAME = "capture_bounding_boxes"
BOUNDING_BOX_TOOL = {
"type": "function",
"name": BOUNDING_BOX_TOOL_NAME,
"strict": True,
"description": (
"Capture normalized bounding boxes for salient regions in the provided image. "
"Each box should map to a meaningful real-world entity or text block and use clockwise point order."
),
"parameters": {
import React, { useState, useEffect, useRef } from ‘react’;
const TextCube = () => {
const [faceTexts, setFaceTexts] = useState([’’, ‘’, ‘’, ‘’, ‘’, ‘’]);
const [prompt, setPrompt] = useState(’’);
const [isGenerating, setIsGenerating] = useState(false);
const streamingIntervals = useRef([]);
// Maximum characters to display per face
const maxChars = 140;
using System;
using System.Xml;
using System.Net;
using System.IO;
using System.Text;
namespace AconexSampleSheet
{
class Program
{
static void Main(string[] args)
@m8e
m8e / README.md
Created June 17, 2025 10:13 — forked from kordless/README.md
Nanonets-OCR Test
@m8e
m8e / Instructions.MD
Created January 25, 2025 19:33 — forked from diogogpinto/Instructions.MD
Best Laravel AI Prompt to use with Claude

I have been utilizing artificial intelligence to enhance and optimize my codebases. After evaluating various models, applications, and editors, I find the claude.ai interface with a Pro Account to be the most effective. Here’s the approach I’ve developed to achieve optimal results:

This gist contains a carefully crafted prompt and a script designed to convert your entire Laravel codebase (excluding the resources folder, which can be easily added if needed) into a TXT file with the following structure:

<File Start: ./path/filename.extension> Content of file <End File: ./path/filename.extension>

To implement this method:

@m8e
m8e / collect_code.sh
Created September 23, 2024 13:51 — forked from sullyo/collect_code.sh
Clones a github repo and puts all the code into a single text file perfect for LLMs
#!/bin/bash
# Check if a GitHub URL is provided as an argument
if [ -z "$1" ]; then
echo "Usage: $0 <github_url>"
exit 1
fi
# Store the GitHub URL
GIT_URL="$1"
@m8e
m8e / dom3d.js
Created August 7, 2024 04:23 — forked from OrionReed/dom3d.js
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@m8e
m8e / timelapse.sh
Created July 16, 2024 14:26 — forked from radermacher/timelapse.sh
Timelapse script; Usage: `timelaps.sh -d 1 -i 3` to record display 1 (main display) with an interval of 3 seconds. OR use `timelaps.sh`and manually select display. An interval of 3 is default.
#!/bin/bash
# Check if ffmpeg is installed
if ! command -v ffmpeg &> /dev/null; then
echo "Error: ffmpeg is not installed or not in the PATH." >&2
echo "Please install ffmpeg to use this script." >&2
exit 1
fi
interval=3
@m8e
m8e / timelapse.sh
Created June 18, 2024 23:32 — forked from stenuto/timelapse.sh
Timelapse script
#!/bin/bash
# Check if interval argument is provided
if [ -z "$1" ]; then
echo "Usage: $0 -int <interval_in_seconds>"
exit 1
fi
# Extract the interval value
interval=$2
@m8e
m8e / program.cs
Created December 1, 2022 02:51 — forked from wqweto/program.cs
Minimal .Net Web Server with Regex Routing in 177 LOC of C#
//
// Poor Man's Web Server with Regex Routing in 177 LOC of C#
//
// This is a simple standalone http server that handles routing with regular expressions
// matching. For each request the router passes capture groups to handlers as a data dictionary.
//
// Router implementation constructs a single composite regex to match request path, based on
// https://nikic.github.io/2014/02/18/Fast-request-routing-using-regular-expressions.html
//
// One can use `WebServer` and `Router` classes alone, just has to register all custom