Skip to content

Instantly share code, notes, and snippets.

View Maxiviper117's full-sized avatar
🚧
Building

David Maxiviper117

🚧
Building
View GitHub Profile
@Maxiviper117
Maxiviper117 / .github\prompts\create-skill.prompt.md
Created December 15, 2025 14:17
VSCode Prompt - Create new Claude skill
description Help me create a new Claude-style skill (with or without CLI-style scripts)
agent agent

Create a New Claude Skill

You are an expert at building reusable, high-quality skills for Claude Skills.

Skills are stored in ~/.claude/skills/ (or ./.claude/skills/ in project contexts).

@Maxiviper117
Maxiviper117 / color-shades-generator.scss
Last active March 23, 2026 12:09
SCSS Color Shades Generator: Dynamic CSS Variable Creation for Theming
// Import the Sass math module for division and other mathematical operations
@use "sass:math";
// Function to generate a series of color shades from a base color
@function generate-shades($base-color) {
// Initialize an empty map to store the shades
$shades: ();
// Define the scale for the shades
$scale: (50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950);
@Maxiviper117
Maxiviper117 / SKILL.md
Created January 29, 2026 08:15
skill/wayfinder-development
name wayfinder-development
description Activates whenever referencing backend routes in frontend components. Use when importing from @/actions or @/routes, calling Laravel routes from TypeScript, or working with Wayfinder route functions.

Wayfinder Development

@Maxiviper117
Maxiviper117 / .prettierrc
Last active December 18, 2025 09:19
React 19 ESlint and Prettier Config
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"arrowParens": "always",
"jsxSingleQuote": false,
@Maxiviper117
Maxiviper117 / .codex\list-codex-skills.js
Last active December 15, 2025 12:16
Use Skills in VSCode Copilot.
// list-codex-skills.js - List all discovered Codex skills with metadata
const fs = require('fs');
const path = require('path');
const os = require('os');
// Only look for skills in the terminal working directory's `.codex/skills`
// (i.e., process.cwd()). Do not consult env vars or user home.
const skillsDir = path.join(process.cwd(), '.codex', 'skills');
@Maxiviper117
Maxiviper117 / Material3.md
Last active November 12, 2025 03:09
Material 3 Color System Summary

🎨 Primary Color Roles

Role Description Typical Use Cases
Primary The main brand or theme color. Highly visible and dominant in the UI. Filled buttons, active states, top app bar, tabs
On Primary Color used for text and icons on top of Primary. Ensures legibility. Text inside filled buttons, icons on colored bars
Primary Container A softer, often lighter version of Primary used for containers. Background for cards, dialogs, or selected UI elements
On Primary Container Color for text/icons on top of Primary Container. Headings, text, and icons in primary-colored containers

@Maxiviper117
Maxiviper117 / CSRFProtectionSveltekit.md
Last active October 31, 2025 10:35
Guide: Implementing CSRF Protection in SvelteKit

Guide: CSRF Protection in SvelteKit

Cross Site Request Forgery (CSRF) is when a browser sends a state changing request to your app without the user intending to do so. SvelteKit already ships with CSRF checks based on the request origin. In most cases you should keep that. Use a custom hook only when you need finer control.


1. Configure SvelteKit CSRF

📂 svelte.config.ts

@Maxiviper117
Maxiviper117 / FastComposerDump.ps1
Created October 28, 2025 17:51
FastComposerDump.ps1 – Speed Up Composer Autoload Generation for Laravel Projects on Windows
<#
FastComposerDump.ps1
IMPORTANT: Run this script as Administrator.
This script temporarily adds your project directory to Windows Defender exclusions to speed up Composer autoload generation, then removes the exclusion after completion.
Usage:
- Right-click PowerShell and select "Run as administrator"
- Execute the script:
.\FastComposerDump.ps1 -ProjectPath "C:\path\to\project" -ComposerArgs "dump-autoload --optimize"
@Maxiviper117
Maxiviper117 / Sveltekit_CRSF_Token_Setup.md
Created February 28, 2025 08:58
CSRF Token setup in Sveltekit

CSRF Token Setup Using Root Layout’s Server Load Function

This guide shows you how to generate a CSRF token once in your root layout so that every page automatically receives the token, reducing duplication and ensuring consistency across your SvelteKit app.


1. Generate and Store the CSRF Token in +layout.server.ts

Create (or update) your root layout server file (+layout.server.ts) to check for an existing CSRF token in cookies. If not present, generate a new token using Node’s crypto module and set it in a cookie:

@Maxiviper117
Maxiviper117 / makeThrowingMock.md
Created August 28, 2025 14:54
Type‑Safe Fail‑Fast Mocks for Effect‑TS Services when using Layer.Mock

🔹 makeThrowingMock — Type‑Safe Fail‑Fast Mocks for Effect‑TS Services

When mocking an Effect.Service or Context.Tag in tests,
you often want full type safety while providing only a subset of method overrides.

makeThrowingMock creates a fail‑fast default implementation where every method throws by default,
and you selectively override only what you need per test case.