Skip to content

Instantly share code, notes, and snippets.

View tejashah88's full-sized avatar

Tejas Shah tejashah88

View GitHub Profile
@tejashah88
tejashah88 / oakd-pipeline-visual-generation-prompt.md
Last active February 12, 2025 17:15
Sample ChatGPT prompt to generate ASCII-based visualization for OAK-D processing pipelines.

Prompt for Pipeline Visualization generation:

Based on this code for working with the OAK-D cameras:

{{ insert OAK-D pipeline code here }}

Create a python comment with an ASCII representation of the pipeline. Be sure
to only draw nodes created with pipeline.create and draw the arrows accordingly.
@tejashah88
tejashah88 / img-2-excel-formula-prompt.md
Last active February 25, 2025 00:22
A prompt for ChatGPT-4o (or any multi-modal) model to convert any uploaded images into Excel formulas for copying.

Image to Excel Formula Prompt

A prompt for ChatGPT-4o (or any multi-modal) model to convert any uploaded images into Excel formulas for copying. I've been using this for my MECH-340W (Mechanical Engineering Design) class in CSU Chico, where we had a lot of tabular calculations with long involved in our design projects.

image

Usage

  1. Go to the ChatGPT website and log into your account. This will allow you to upload images.
@tejashah88
tejashah88 / Read-Serial-Data-Arduino.ps1
Last active March 26, 2025 22:40
A PowerShell script to read serial data from any Arduino. Supports writing to CSV file (assuming Arduino sketch is programmed to do so).
param(
[Parameter(Mandatory=$true)][string]$PortName,
[Parameter(Mandatory=$true)][int]$BaudRate,
[Parameter()][string]$CsvPath = ""
)
# Initialize serial port communication
$port = New-Object System.IO.Ports.SerialPort
$port.PortName = $PortName
$port.BaudRate = $BaudRate
@tejashah88
tejashah88 / count-bookmarks-bar.js
Created April 16, 2025 14:02
(Recursively) Lists the count of bookmarks for each folder on your bookmarks bar. Supports all Chromium-based browsers.
// README: Run this by copying the code and pasting it in DevTools
function countBookmarksRecursively(node) {
let count = 0;
if (node.children) {
for (const child of node.children) {
count += countBookmarksRecursively(child);
}
} else if (node.url) {
count += 1;