Skip to content

Instantly share code, notes, and snippets.

View regenrek's full-sized avatar

Kevin Kern regenrek

View GitHub Profile
import { CSSProperties, useEffect, useState } from 'react';
import { useFrame } from '@react-three/fiber';
import { useWorld } from 'koota/react';
// Define the Chrome performance memory interface
interface PerformanceMemory {
usedJSHeapSize: number;
jsHeapSizeLimit: number;
totalJSHeapSize: number;
}
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title gimmevid
# @raycast.mode compact
# Optional parameters:
# @raycast.icon ▶️
# @raycast.argument1 { "type": "text", "placeholder": "Insert Video Url..." }
@regenrek
regenrek / .cursorrules
Last active April 14, 2025 15:26
Cursorrule for Nuxt3 Typescript and Nuxt Ui
You have extensive expertise in Vue 3, Nuxt 3, TypeScript, Node.js, Vite, Vue Router, Pinia, VueUse, Nuxt UI, and Tailwind CSS. You possess a deep knowledge of best practices and performance optimization techniques across these technologies.
Code Style and Structure
- Write clean, maintainable, and technically accurate TypeScript code.
- Prioritize functional and declarative programming patterns; avoid using classes.
- Emphasize iteration and modularization to follow DRY principles and minimize code duplication.
- Prefer Composition API <script setup> style.
- Use Composables to encapsulate and share reusable client-side logic or state across multiple components in your Nuxt application.
Nuxt 3 Specifics
@regenrek
regenrek / p10k installation
Last active October 7, 2024 13:33
Installs p10k + zsh for iterm2
# Install iTerm2 (if not installed manually)
# Download from: https://iterm2.com/downloads.html
# Install zsh (if not installed)
brew install zsh
# Make zsh the default shell
chsh -s $(which zsh)
# Install Oh My Zsh
@regenrek
regenrek / AppNav.vue
Last active September 8, 2021 07:58
AppNav vue
<template>
<aside
class="w-full lg:w-1/5 lg:block fixed lg:relative inset-0 mt-16 lg:mt-0 z-30 bg-white dark:bg-gray-900 lg:bg-transparent lg:dark:bg-transparent"
>
<div class="lg:sticky lg:top-16 overflow-y-auto h-full lg:h-auto lg:max-h-(screen-16)">
<ul class="p-4 lg:py-8 lg:pl-0 lg:pr-8">
<li
v-for="(docs, category, index) in categories"
:key="category"
class="mb-4"
@regenrek
regenrek / ext
Last active August 6, 2020 13:39
{
"workbench.startupEditor": "newUntitledFile",
"window.zoomLevel": 0,
"eslint.validate": ["typescript", "typescriptreact"],
"explorer.confirmDelete": false,
"explorer.confirmDragAndDrop": false,
"editor.wordWrap": "on",
"php.validate.enable": false,
"php.suggest.basic": false,
"editor.codeActionsOnSave": {
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC0WYnhazI0t0+oIq4iDJQ4o5NHRRuG3JA5pgyJrqCutR5F6jdJMoMkNxYuhlk/wu7s0OkLOwTtcWo+O1RrgbvDfCmL3+5suhEspj/cXyVk72SmPYBDSVVy6ID6lzOhgKeP5/keXrRYTap3fhgQIU1cBfL44p6OtDsrfG+nx9t7v6OvOSqggAzWZ14yaspXIp6FeYaNCLP2alGB1qDGft2Y5uO8ZNTIiNTjnq3gr8tI2wcXHhWjeXsrA3cR6f1A4Btyq2JzTnQLeZ+sMGzE7cXe9K6DbMu16zXwo9oBHUu9CtJTu4fcNSZqX2Lpj28R2kXPnBelHj5y+7uKNyvWmqCSb0AGIRrPmNr/qnQu7cH0r0REmZzZ0nxo18jr9fd+x4UgC+Idz1YpzdmiQy7SHSq7QAzkHL/qjqJlxr1VLHZ2AsLYvqaP8/qgxKd3L7bQFF5ZN6ov/lBeXXMKHdxTREoVbJxJR1yPSScGjCgUTCZWQbFXv6ij7yaAWcZ21gdzHx22UJADDSKJTlAOLqPdBc+su/3ONmL6t0NC11j18/JMInm2MRai3wefROmpgENZ2fTRsbqAJWJy5XwXpZMMd0uez4NrSiAqKueWvFD7iu7Fs+vFozcngvQpeI0mCLFhXF8OOkYgYtP4zXuuoqAWONMrvTimgA1cyeOQJ0ebnx/UgQ== [email protected]
#### USAGE
<aspect-ratio-image class="max-w-80" :imageSrc="person.image[0].image" :aspectRatio="person.image[0].aspect_ratio" />
#### AspecRatioImage Component
<template>
<template>
<figure :class="[objectFit !== '' ? 'is-' + objectFit : '']">
<picture v-if="imageFetchMode === 'srcset'">
<source :data-srcset="image.webp" type="image/webp" />
<source :data-srcset="image.opt" type="image/jpg" />
<img
:src="image.placeholder"
class="lazyload blur"
:data-src="image.opt"
/>
<?php
/**
* Class Name: wp_bootstrap_navwalker
* GitHub URI: https://github.com/twittem/wp-bootstrap-navwalker
* Description: A custom WordPress nav walker class to implement the Bootstrap 3 navigation style in a custom theme using the WordPress built in menu manager.
* Version: 2.0.4
* Author: Edward McIntyre - @twittem
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt