Skip to content

Instantly share code, notes, and snippets.

View marceloavf's full-sized avatar
🪐
Sic Parvis Magna

Marcelo Formentão marceloavf

🪐
Sic Parvis Magna
View GitHub Profile
@aashari
aashari / 00 - Cursor AI Prompting Rules.md
Last active June 1, 2025 10:30
Cursor AI Prompting Rules - This gist provides structured prompting rules for optimizing Cursor AI interactions. It includes three key files to streamline AI behavior for different tasks.

Cursor AI Prompting Framework — Usage Guide

This guide shows you how to apply the three structured prompt templates—core.md, refresh.md, and request.md—to get consistently reliable, autonomous, and high-quality assistance from Cursor AI.


1. Core Rules (core.md)

Purpose:
Defines the AI’s always-on operating principles: when to proceed autonomously, how to research with tools, when to ask for confirmation, and how to self-validate.

@sindresorhus
sindresorhus / esm-package.md
Last active May 30, 2025 12:32
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
declare type NonNullablePropertyNames <T extends Object> =
{ [K in keyof T]: T[K] extends null | undefined ? never : K }[keyof T];
declare type Merge <T extends Object, U extends Object> =
Pick<T, Exclude<keyof T, keyof U>> & Pick<U, NonNullablePropertyNames<U>>;
@ebidel
ebidel / coverage.js
Last active April 27, 2024 04:13
CSS/JS code coverage during lifecycle of page load
Moved to https://github.com/ebidel/puppeteer-examples
@eolant
eolant / Confirm.vue
Last active July 29, 2024 18:14
Vuetify Confirm Dialog component that can be used locally or globally
<template>
<v-dialog v-model="dialog" :max-width="options.width" :style="{ zIndex: options.zIndex }" @keydown.esc="cancel">
<v-card>
<v-toolbar dark :color="options.color" dense flat>
<v-toolbar-title class="white--text">{{ title }}</v-toolbar-title>
</v-toolbar>
<v-card-text v-show="!!message" class="pa-4">{{ message }}</v-card-text>
<v-card-actions class="pt-0">
<v-spacer></v-spacer>
<v-btn color="primary darken-1" text @click.native="agree">Yes</v-btn>
@rdeavila
rdeavila / git-update-fork.sh
Last active March 10, 2025 23:52
Git: como atualizar um fork com as mudanças do original?
#!/bin/bash
# Adicione um novo remote; pode chamá-lo de "upstream":
git remote add upstream https://github.com/usuario/projeto.git
# Obtenha todos os branches deste novo remote,
# como o upstream/master por exemplo:
git fetch upstream
IMPORTANT
Please duplicate this radar for a Safari fix!
This will clean up a 50-line workaround.
rdar://22376037 (https://openradar.appspot.com/radar?id=4965070979203072)
//////////////////////////////////////////////////////////////////////////////
(Now available as a standalone repo.)