Skip to content

Instantly share code, notes, and snippets.

View mkelley33's full-sized avatar
🎯
Focusing

Michaux Sean Kelley mkelley33

🎯
Focusing
View GitHub Profile
{"schemaVersion":1,"label":"version","message":"v4.193.0","color":"blue"}
{"schemaVersion":1,"label":"coverage","message":"99.13%","color":"brightgreen"}
@mkelley33
mkelley33 / gist:eb1549dddb65672a0724c2a91bd873fc
Created February 25, 2024 21:53
zsh script to replace all spaces and special characters in a file name for all files in the directory with dashes and make all letters lowercase removing the last dash in the file name
#!/bin/zsh
# Iterate over files in the directory
for filename in *; do
# Check if the filename is a regular file
if [[ -f "$filename" ]]; then
# Extract filename and extension
base_filename=$(basename "$filename")
extension="${base_filename##*.}"
base_filename="${base_filename%.*}"
{"schemaVersion":1,"label":"coverage","message":"unknown","color":"lightgrey"}
@mkelley33
mkelley33 / copilot-instructions.md
Created November 9, 2025 02:03
GitHub Copilot Instructions

Copilot Instructions

Persona

As a distinguished senior full-stack TypeScript developer with over a decade of experience, I am renowned for architecting and delivering high-performance web applications using Next.js, React, Tailwind CSS, Prisma, and AWS. My expertise extends beyond coding to encompass the design of scalable, maintainable solutions that consistently adhere to the highest industry standards and best practices. I am deeply committed to crafting exceptional user experiences through meticulous performance optimization and intuitive design principles. My extensive knowledge of testing methodologies and DevOps practices ensures that the software I develop is not only robust and reliable but also of unparalleled quality. Celebrated for my collaborative approach and leadership skills, I actively mentor junior developers and cultivate a culture of continuous improvement within development teams. My holistic perspective on software development drives innovation and successful project outcomes, sol

@mkelley33
mkelley33 / gist:c1bf2ca7d902c281480ea83420092c66
Last active October 26, 2025 09:46
VisualStudio Code GitHub Copilot testing prompt #1 - Good, Better, Best, Oustanding (GBBO) technique that I organically discovered
As a senior software engineer with over
10 years of experience and deep expertise in automated unit testing with TypeScript,
Next.js, React, TailwindCSS v4, and shadcn-ui, lucide-react,
and all dependencies in the #package.json,
generate a comprehensive suite of unit tests for the
all unconvered code in the repository using vitest as the testing framework. Ensure that the tests cover all possible
edge cases, input scenarios, and error conditions
to achieve high code coverage and reliability. Incorporate
best practices for test organization, naming conventions,
and mocking/stubbing dependencies where necessary. Additionally, provide explanations for the testing
@mkelley33
mkelley33 / simple-pagination.js
Created February 9, 2024 23:39 — forked from kottenator/simple-pagination.js
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@mkelley33
mkelley33 / best_in_place_fix.js.coffee
Created December 3, 2012 07:43
best_in_place: fix disappearing line-breaks in textarea
jQuery ->
$('[id^="best_in_place_your_object_"],[id$="address"]').on 'best_in_place:update', (event) ->
$address = $(event.target)
$address.data('bestInPlaceEditor').original_content = $address.html()
$address.html $address.html().replace(/[\n\r]+/g, '<br>')
@mkelley33
mkelley33 / clear-coffee-script.coffee
Created November 28, 2012 01:20
Clear form with CoffeeScript
(($) ->
$.fn.clearForm = ->
@find(":input").each ->
switch @type
when "password", "select-multiple"
, "select-one"
, "text"
, "textarea"
$(this).val ""
when "radio", "checkbox"
@mkelley33
mkelley33 / webpack.config.js
Created November 20, 2016 00:42
webpack-dashboard config
const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
// add
const Dashboard = require('webpack-dashboard');
const DashboardPlugin = require('webpack-dashboard/plugin');
const dashboard = new Dashboard();
// add