Skip to content

Instantly share code, notes, and snippets.

View shpetimhaxhiu's full-sized avatar

Pito The Dev shpetimhaxhiu

View GitHub Profile
@shpetimhaxhiu
shpetimhaxhiu / 0-project-documentation.md
Last active January 31, 2025 02:41
Cursor - Ultra Detailed Project Documentation Prompt

Analyze this projects codebase and Document it appropriately

Conduct a comprehensive analysis of the current project structure to create clear and maintainable documentation. Focus on:

  • Architectural Overview:
    • Map out the high-level structure of the project
    • Identify core modules and their relationships
    • Document architectural patterns and design decisions
    • Highlight any technical debt or areas for improvement
@shpetimhaxhiu
shpetimhaxhiu / regex-match-svgs.md
Created July 23, 2024 19:17
REGEX - Match SVGs
We couldn’t find that file to show.
@shpetimhaxhiu
shpetimhaxhiu / click-to-copy-v2.md
Last active May 1, 2024 16:45
This bookmarklet lets you click on any element to copy its inner text to the clipboard, and it automatically deactivates after the first copy operation. This is useful for copying text quickly without leaving the bookmarklet active, preventing accidental copies during further navigation.

One-Click Text Copier with Cursor Indicator and Notification v2

Description:

This improved bookmarklet is designed to simplify the process of copying text from a webpage. With a single click, you can copy the text of any webpage element. The tool automatically deactivates after the copy operation to prevent accidental copies.

When you hover over an element, the cursor changes to a 'copy' icon, indicating that the text of that element can be copied.

After the text is copied, a notification appears at the bottom right of the page to confirm the operation. This notification is subtle and does not disrupt the user experience.

@shpetimhaxhiu
shpetimhaxhiu / saveGPT.js
Created April 13, 2024 23:58
🔓 Save GPT
‎‎​
@shpetimhaxhiu
shpetimhaxhiu / specs.md
Created April 7, 2024 19:57
ChatGPT Prompt Manager

Project Title: ChatGPT Prompt Manager

Type of Application: Web Application

Description: ChatGPT Prompt Manager as a Web App using Next.js and TailwindCSS, deployed on Vercel, and using a simple JSON file as a database.

Functional Requirements:

  1. Prompt Storage: Enable users to store and manage a collection of ChatGPT prompts.
  2. User Interface for Prompt Management: Provide functionalities to create, read, update, and delete (CRUD) prompts.
@shpetimhaxhiu
shpetimhaxhiu / index.js
Created March 26, 2024 23:39 — forked from ihsangan/index.js
Send email from Workers with MailChannel API
async function readRequestBody(request) {
const { headers } = request;
const contentType = headers.get('content-type') || '';
if (contentType.includes('application/json')) {
return JSON.stringify(await request.json());
} else if (contentType.includes('form')) {
const formData = await request.formData();
const body = {};
for (const entry of formData.entries()) {
body[entry[0]] = entry[1];
@shpetimhaxhiu
shpetimhaxhiu / @mattupham Omegle IP Location Finder
Created December 25, 2023 09:05 — forked from mattupham/@mattupham Omegle IP Location Finder
@mattupham Omegle IP Location Finder - Ask Questions in our Discord, links below
// Subscribe on YouTube, and follow on TikTok (@mattupham)! Socials found below:
// https://mattupham.com/links
// @ me on Discord with any questions!
https://link.mattupham.com/discord
// --------------------------------------------
// PLEASE REPLACE "your-api-key-here" WITH AN
// API KEY FROM https://ipgeolocation.io/
let apiKey = "your-api-key-here";

FWIW: I (@Rondy) am not the author of the content presented here, which is an outline from Edmond Lau's book. I've just copy-pasted it from somewhere and saved as a personal gist, before it got popular on newsnews.ycombinator.com. I don't remember where exactly the original source is from and neither could find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

@shpetimhaxhiu
shpetimhaxhiu / one-click-url-extractor.js
Last active October 19, 2023 18:02
One-Click URL Extractor Bookmarklet
javascript: (function () {
/* Function to extract URLs from an element's children */
function extractUrls (element) {
let urls = []
let anchors = element.querySelectorAll('* a[href]')
anchors.forEach(anchor => {
if (anchor.href) {
urls.push(anchor.href)
}
})
mkdir ~/bin
mkdir ~/bin/wp-cli
cd ~/bin/wp-cli
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
echo "export COLUMNS" >> ~/.bashrc
echo "alias wp='php ~/bin/wp-cli/wp-cli.phar'" >> ~/.bashrc
echo "alias php='/usr/bin/php'" >> ~/.bashrc
source ~/.bashrc
echo "PATH=$HOME/bin:$PATH" >> ~/.bashrc