Skip to content

Instantly share code, notes, and snippets.

View riccjohn's full-sized avatar
☠️

John Riccardi riccjohn

☠️
View GitHub Profile
@riccjohn
riccjohn / PromptEngineer.md
Created September 24, 2025 19:37
Prompt to help you iterate on creating new prompts

Prompt Engineer

You are an expert prompt engineering mentor and a master of your craft. Your goal is to help me, a software developer, learn to create highly effective prompts through a structured, iterative, and hands-on process.

Your process will be highly structured and iterative. We will work together through the following steps to refine a single prompt until it is ready for use.

1.  Initial Critique: When I provide a prompt, you will first analyze and critique it as a prompt engineering mentor. Your critique will be concise and focused on identifying specific areas for improvement, such as lack of specificity, ambiguous instructions, missing context, or potential for unwanted outputs.

2.  Clarifying Questions: After your critique, you will ask a series of targeted, clarifying questions. These questions are designed to help me think critically and provide the necessary context, constraints, and goals that will enable you to generate an improved version. You must not proceed to the next step

@riccjohn
riccjohn / typescriptreact.json
Last active June 4, 2025 22:10
VSCode Snippets
{
"Create Storybook Story": {
"prefix": ["sbstory", "storybookstory"],
"body": [
"import type { Meta, StoryObj } from '@storybook/react';",
"import ${1:${TM_FILENAME_BASE/(.*)\\.stories$/$1/}} from './${1:${TM_FILENAME_BASE/(.*)\\.stories$/$1/}}';",
"",
"const meta = {",
"\tcomponent: ${1:${TM_FILENAME_BASE/(.*)\\.stories$/$1/}},",
"\targs: {",
@riccjohn
riccjohn / convertMdImgToHtml.ts
Last active February 5, 2025 22:31
Convert markdown images to html image tags
type Options = {
width?: number;
height?: number;
class?: string;
};
const convertMdImgToHtml = (markdownImages: string[], options?: Options) => {
const convertedImages = markdownImages.map((markdownImage) => {
return markdownImage.replace(
/!\[(.*?)\]\((.*?)\)/g,
// ==UserScript==
// @name Display current year PTO only
// @namespace MetricAi
// @version 2024-03-26
// @description Hides PTO from previous & future calendar years
// @author You
// @match https://psa.metric.ai/home/my-timeoff/policies/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=metric.ai
// @grant none
// ==/UserScript==
// ==UserScript==
// @name MetricAI Max Width
// @namespace MetricAi
// @version 2024-03-29
// @description Make content full width
// @author You
// @match *://psa.metric.ai/home/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=metric.ai
// @grant none
// ==/UserScript==
{
index: 0,
timestamp: 1537236800416,
data: 'Genesis Block',
prevHash: '0',
thisHash: 'a0fec317fe451b2aaeefc62db8e58a69a2eb72811bc0618693815c428882e4b0'
},
{
index: 1,
timestamp: 1537236800417,
const sha256 = require('sha256');
class Block {
constructor(index, timestamp, data, prevHash) {
this.index = index;
this.timestamp = timestamp;
this.data = data;
this.prevHash = prevHash;
this.thisHash = sha256(
this.index + this.timestamp + this.data + this.prevHash
const createBlockchain = num => {
const blockchain = [createGenesisBlock()];
let previousBlock = blockchain[0];
for (let i = 1; i < num; i += 1) {
const blockToAdd = nextBlock(previousBlock, `This is block #${i}`);
blockchain.push(blockToAdd);
previousBlock = blockToAdd;
}
console.log(blockchain);
const sha256 = require('sha256');
class Block {
constructor(index, timestamp, data, prevHash) {
this.index = index;
this.timestamp = timestamp;
this.data = data;
this.prevHash = prevHash;
this.thisHash = sha256(
this.index + this.timestamp + this.data + this.prevHash
const sha256 = require('sha256');
class Block {
constructor(index, timestamp, data, prevHash) {
this.index = index;
this.timestamp = timestamp;
this.data = data;
this.prevHash = prevHash;
this.thisHash = sha256(
this.index + this.timestamp + this.data + this.prevHash