Skip to content

Instantly share code, notes, and snippets.

View pertrai1's full-sized avatar
🏠
Working from home

Rob Simpson pertrai1

🏠
Working from home
View GitHub Profile
@pertrai1
pertrai1 / PROMPT.md
Last active February 10, 2026 14:03
Repository Creator Prompt

Create GitHub Repository from Local Project

Role

You are a senior DevOps engineer with deep expertise in Git workflows, GitHub repository management, and project scaffolding. You follow best practices for repository initialization, .gitignore configuration, and clean commit history.

Mission

Take an existing local project from a specified directory and publish it as a new, standalone GitHub repository under the user's account. The new repository should be clean, well-structured, and ready for collaboration.

@pertrai1
pertrai1 / ralph.sh
Created February 10, 2026 13:34
Ralph Wiggum
while :; do cat PROMPT.md | claude-code ; done
for i in {1..6}; do cat PROMPT.md | claude-code; done
for i in {1..6}; do echo "=== Run $i of 6 ==="; cat PROMPT.md | claude-code; done

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@pertrai1
pertrai1 / ecmascript-spec-cheatsheet.md
Last active May 11, 2025 12:02
ECMAScript Spec Language Cheat Sheet

📘 ECMAScript Spec Language Cheat Sheet

A quick reference for understanding the abstract language used in the ECMAScript (JavaScript) specification, especially when reading sections like IsLooselyEqual.


🔣 Prefix Operators

Symbol Meaning Example Plain English
@pertrai1
pertrai1 / array-prototype.js
Created November 20, 2024 15:42
JS Array Prototype - Interview Question
/**
* Without calling Array.prototype.map(), Array.prototype.filter(), Array.prototype.reduce(), or
* Array.prototype.forEach(), implement the following three similar functions on the Array prototype:
*/
/*
* myMap(callback)
* Without mutating the original array, this function should call the passed callback function on every
* element of the array and return a new array containing the result of all these calls, in the corresponding order.
* The callback function can take up to three parameters:
@pertrai1
pertrai1 / robot-emoji.css
Created November 16, 2024 00:53
Robot Emoji
:root {
--head-bg: #a4d9eb;
--head-bdr-clr: #9bbcc2;
--bulb-bg: #ffa500;
--stick-bg: #808080;
--ear-bg: #c90a0a;
--eye-bg: #fff;
--eye-bdr-clr: #00b3ff;
--nose-bg: #c90a0a;
--mouth-bg: #dedede;
@pertrai1
pertrai1 / actionlist.vim
Created March 10, 2024 23:32 — forked from zchee/actionlist.vim
IdeaVim actionlist
--- Actions ---
$Copy <M-C>
$Cut <M-X> <S-Del>
$Delete <Del> <BS> <M-BS>
$LRU
$Paste <M-V>
$Redo <M-S-Z> <A-S-BS>
$SearchWeb <A-S-G>
$SelectAll <M-A>
$Undo <M-Z>
// Variable to store the previous bounds
let previousBounds = null;
// Event listener for the 'moveend' event of the map
map.on('moveend', () => {
const currentBounds = map.getBounds();
// Check if there are previous bounds
if (previousBounds) {
const distance = getDistance(previousBounds, currentBounds);
@pertrai1
pertrai1 / back.html
Created September 9, 2022 14:26
Back Top
<a id="back-to-top"
class="scroll-top scroll-top-link">
<i class="fa fa-arrow-circle-up"></i>
</a>

We've installed your MySQL database without a root password. To secure it run: mysql_secure_installation

MySQL is configured to only allow connections from localhost by default

To connect run: mysql -uroot

To restart mysql after an upgrade: brew services restart mysql