Skip to content

Instantly share code, notes, and snippets.

@yifanzz
yifanzz / .cursorrules
Last active January 4, 2025 23:56
EP7 Notes
You are an expert in TypeScript, Node.js, Next.js App Router, React, Shadcn UI, Radix UI and Tailwind.
Project Context: This is a dev tool built for evaluating open source projects allowing people to better understand the maintainability, activity and longevity of a given project to allow devs to better decide whether they should include or use the given open source repositories after the analysis
Code Style and Structure
- Write concise, technical TypeScript code with accurate examples.
- Use functional and declarative programming patterns; avoid classes.
- Prefer iteration and modularization over code duplication.
- Use descriptive variable names with auxiliary verbs (e.g., isLoading, hasError).
- Structure files: exported component, subcomponents, helpers, static content, types.
@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@summivox
summivox / fanatec_shifter.ino
Last active January 4, 2025 23:53
DIY USB adapter for Fanatec ClubSport Shifter SQ v1.5 (Arduino Due)
#include <cstdint>
#include "Joystick.h"
const int16_t gate_r = 3340;
const int16_t gate_12 = 2690;
const int16_t gate_34 = 2000;
const int16_t gate_56 = 1230;
const int16_t gate_7 = 550;
@depau
depau / README.md
Last active January 4, 2025 23:52
Valetudo Gamepad Control

PyGame-based Valetudo Gamepad Remote Control

Uses PyGame, so it should work with all gamepads that work in actual games.

Nasty code ;)

It requires the gamepad to have at least one analog stick.

Modify the script and set DRY_RUN to True to avoid contacting Valetudo during gamepad testing.

@tylermorganwall
tylermorganwall / beeswarm.R
Created January 4, 2025 20:12
3D beeswarm
#Function to generate random 3D points within a defined space
initialize_swarm = function(n=100, range=10) {
swarm = matrix(runif(n * 3, -range, range), ncol=3)
velocities = matrix(runif(n * 3, -0.1, 0.1), ncol=3)
list(swarm=swarm, velocities=velocities)
}
spinning_vector_field = function(swarm, spin_strength=0.05) {
#Swirl around the Z-axis
@diogogpinto
diogogpinto / Instructions.MD
Created January 3, 2025 13:14
Best Laravel AI Prompt to use with Claude

I have been utilizing artificial intelligence to enhance and optimize my codebases. After evaluating various models, applications, and editors, I find the claude.ai interface with a Pro Account to be the most effective. Here’s the approach I’ve developed to achieve optimal results:

This gist contains a carefully crafted prompt and a script designed to convert your entire Laravel codebase (excluding the resources folder, which can be easily added if needed) into a TXT file with the following structure:

<File Start: ./path/filename.extension> Content of file <End File: ./path/filename.extension>

To implement this method:

@thdtt
thdtt / activate.cmd
Last active January 4, 2025 23:45
Office 365 Activator; dont forget to turn off windows defenter real time protection
@echo off
title Activate Office 365 ProPlus for FREE - MSGuides.com&cls&echo ============================================================================&echo #Project: Activating Microsoft software products for FREE without software&echo ============================================================================&echo.&echo #Supported products: Office 365 ProPlus (x86-x64)&echo.&echo.&(if exist "%ProgramFiles%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office16")&(if exist "%ProgramFiles(x86)%\Microsoft Office\Office16\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office16")&(for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_kms*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&(for /f %%x in ('dir /b ..\root\Licenses16\proplusvl_mak*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%%x" >nul)&echo.&echo ============================================================================&echo Activating your Office...&cscript //nologo slmgr.vbs /ck
Film Genre Lead Studio Audience score % Profitability Rotten Tomatoes % Worldwide Gross Year
Zack and Miri Make a Porno Romance The Weinstein Company 70 1.747541667 64 $41.94 2008
Youth in Revolt Comedy The Weinstein Company 52 1.09 68 $19.62 2010
You Will Meet a Tall Dark Stranger Comedy Independent 35 1.211818182 43 $26.66 2010
When in Rome Comedy Disney 44 0 15 $43.04 2010
What Happens in Vegas Comedy Fox 72 6.267647029 28 $219.37 2008
Water For Elephants Drama 20th Century Fox 72 3.081421053 60 $117.09 2011
WALL-E Animation Disney 89 2.896019067 96 $521.28 2008
Waitress Romance Independent 67 11.0897415 89 $22.18 2007
Waiting For Forever Romance Independent 53 0.005 6 $0.03 2011
@ales-tsurko
ales-tsurko / install-alacritty-ubuntu.sh
Last active January 4, 2025 23:38 — forked from Aaronmacaron/install-alacritty-ubuntu.sh
Install Alacritty on Ubuntu
#!/bin/bash
# This installs alacritty terminal on ubuntu (https://github.com/jwilm/alacritty)
# You have to have rust/cargo installed for this to work
# Install required tools
sudo apt-get install -y cmake libfreetype6-dev libfontconfig1-dev xclip
# Download, compile and install Alacritty
git clone https://github.com/jwilm/alacritty
@jouyouyun
jouyouyun / aggregator-proxy.yaml
Last active January 4, 2025 23:37
Contents from aggregator
# aggregator