Skip to content

Instantly share code, notes, and snippets.

View lacymorrow's full-sized avatar
🕶️
Grok'ing

Lacy Morrow lacymorrow

🕶️
Grok'ing
View GitHub Profile
@lacymorrow
lacymorrow / CursorTools.json
Created January 31, 2025 08:36 — forked from ScriptedAlchemy/CursorTools.json
Reverse Engineering cursor prompts
{
"tools": [
{
"type": "function",
"function": {
"name": "codebase_search",
"description": "Find snippets of code from the codebase most relevant to the search query.\nThis is a semantic search tool, so the query should ask for something semantically matching what is needed.\nIf it makes sense to only search in particular directories, please specify them in the target_directories field.\nUnless there is a clear reason to use your own search query, please just reuse the user's exact query with their wording.\nTheir exact wording/phrasing can often be helpful for the semantic search query. Keeping the same exact question format can also be helpful.",
"parameters": {
"type": "object",
"properties": {
@lacymorrow
lacymorrow / multiple_ssh_setting.md
Created January 24, 2025 01:38 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@lacymorrow
lacymorrow / CheatSheet.md
Last active March 27, 2024 20:08
Shell Cheat Sheet
# https://yurisk.info/2023/03/28/mdfind-macos-examples-cheat-sheet
# Find files where filename includes string (case-insensitive)
mdfind -name ...

# Find folders where name includes string (case-insensitive)
mdfind -name ... kind:folder

# See where an alias was defined
@lacymorrow
lacymorrow / loading_messages.js
Created January 8, 2024 00:08 — forked from meain/loading_messages.js
Funny loading messages
export default [
"Reticulating splines...",
"Generating witty dialog...",
"Swapping time and space...",
"Spinning violently around the y-axis...",
"Tokenizing real life...",
"Bending the spoon...",
"Filtering morale...",
"Don't think of purple hippos...",
"We need a new fuse...",
@lacymorrow
lacymorrow / best-practices.md
Created November 2, 2023 18:29
Javascript Dev Best Practices

Best Practices for Good Javascript

These are personal observations I keep for myself

Naming

Name your files like-this.file or likeThis.file, dashes allow you to delete one word at a time, camelCase allows IDE snippets to automatically scaffold the name.

Debugging

@lacymorrow
lacymorrow / prettyCamelCase.js
Created August 9, 2023 21:49
JS function to format a camelCase string into a "Camel Case" pretty string
function prettyFormat(str) {
return str.split(/(?=[A-Z])/)
.map(function(word) {
return word.charAt(0).toUpperCase() + word.slice(1);
})
.join(' ');
}
@lacymorrow
lacymorrow / vscode-bug.ts
Created July 20, 2023 21:03
VSCode Bug
import { cache } from 'react';
export const getBaseUrl = cache(() =>
process.env.VERCEL_URL
? `https://app-dir.vercel.app`
: `http://localhost:${process.env.PORT ?? 3000}`,
);
import { cache } from 'react';
export const getBaseUrl = cache(() =>
process.env.VERCEL_URL
? `https://app-dir.vercel.app`
: `http://localhost:${process.env.PORT ?? 3000}`,
);
@lacymorrow
lacymorrow / Add an app to run automatically at startup in Windows 10
Created May 28, 2023 22:46
Add an app to run automatically at startup in Windows 10
Windows 10
Select the Start button and scroll to find the app you want to run at startup.
Right-click the app, select More, and then select Open file location. This opens the location where the shortcut to the app is saved. If there isn't an option for Open file location, it means the app can't run at startup.
With the file location open, press the Windows logo key + R, type shell:startup, then select OK. This opens the Startup folder.
Copy and paste the shortcut to the app from the file location to the Startup folder.
@lacymorrow
lacymorrow / text-to-image.php
Created May 24, 2023 03:34
Uses an uploaded font to change text into an image.
<?php
// Copyright (c) 2005, Lacy Morrow
// All rights reserved.
// ******************Text-Image PHP Script***********************
// Uses an uploaded font to change text into an image. Multiple options.
// USE:
// ONLY SUPPORTS .ttf fonts
// Use the format "http://www.yourdomain.com/text.php?s=11&text=hello&font=TIMES"