Skip to content

Instantly share code, notes, and snippets.

@ezequieltejada
ezequieltejada / custom-rules.js
Created March 16, 2025 17:27 — forked from Illyism/custom-rules.js
ESLint 200-Line Max File Size Rule for Better AI Coding
/**
* 🧠 My game-changing ESLint rule that makes AI coding 10x better:
* - Enforces 200-line max file size
* - Counts only actual code (ignores comments)
* - Gives helpful refactoring suggestions
* - Works perfectly with Cursor AI's "Fix in Chat"
*
* Custom ESLint rule to limit file size to 200 lines
* @type {import("eslint").Rule.RuleModule}
*/
@ezequieltejada
ezequieltejada / post prompt.md
Last active February 18, 2025 14:28
AI Coding

Improve coding with this simple prompt:

Reflect on 5-7 different possible sources of the problem, distill those down to 1-2 most likely sources, and then add logs to validate your assumptions before we move onto implementing the actual code fix
@ezequieltejada
ezequieltejada / .cursorrules
Last active October 6, 2024 11:32 — forked from Shpigford/.cursorrules
Cursor Rules
# Original instructions: https://forum.cursor.com/t/share-your-rules-for-ai/2377/3
# Original original instructions: https://x.com/NickADobos/status/1814596357879177592
You are an expert AI programming assistant that primarily focuses on producing clear, readable Angular, RxJS, TypeScript, and Node.js code.
You always use the latest version of Angular, TypeScript, RxJS, and Node.js, and you are familiar with the latest features and best practices in these technologies.
You carefully provide accurate, factual, thoughtful answers, and excel at reasoning.
Guidelines to follow:
- Follow the user’s requirements carefully and exactly.
@ezequieltejada
ezequieltejada / firebase config.ts
Last active September 14, 2023 19:42
firebase.json
export const environment = {
appName: 'app-name',
useEmulators: true,
firebase: {
projectId: 'demo-project',
appId: 'valid-app-id',
storageBucket: 'app-name.appspot.com',
apiKey: 'valid-api-key',
authDomain: 'app-name.firebaseapp.com',
messagingSenderId: '1111111',
NOTA: Ejecutar comandos sobre POWERSHELL con permisos de Administrador.
OpenSSH está incluido con Windows 10, Actualización 1803.
#Verificando las caracteristicas
$> Get-WindowsCapability -Online | Where-Object -Property Name -Like "OpenSSH*"
Name : OpenSSH.Client~~~~0.0.1.0
State : Installed
Name : OpenSSH.Server~~~~0.0.1.0
State : NotPresent
@ezequieltejada
ezequieltejada / angular-material-theme-cheatsheet.md
Last active December 12, 2022 08:03
Angular Material Theme Course Cheat Sheet

Angular Material Theming Cheatsheet

Create a theme for a component.

  1. Create a new file for theming the component at the same level as the component itself. Call it "{{componentName}}.scss-theme.scss" (From now on called the theme file)
  2. Inside the theme file import material theming utils with @use '~@angular/material/theming' as material;
  3. Then create a mixing with the name of the component and make it receive a parameter of $theme in order to provide for the theme. @mixin app-banner-theme($theme) {...}.
  4. Inside that mixing, add all the neccesary styling for the component. You can access the theme colors like this:
    $theme-colors: material.mat-get-color-config($theme);

$success-color: map-get($theme-colors, success);

@ezequieltejada
ezequieltejada / rx-online-offline.js
Created October 11, 2022 14:18 — forked from ccnokes/rx-online-offline.js
Online/offline event observable with RxJS (see comments below for a better, more up-to-date way of doing this)
const { Observable } = require('rxjs/Observable');
require('rxjs/add/observable/fromEvent');
require('rxjs/add/operator/map');
require('rxjs/add/observable/merge');
function createOnline$() {
//merge several events into one
return Observable.merge(
//use .map() to transform the returned Event type into a true/false value
Observable.fromEvent(window, 'offline').map(() => false),
@ezequieltejada
ezequieltejada / appEngineHandleShutdownGracefully.md
Last active October 7, 2022 10:41
App Engine gracefully handle shutdown

How to handle shutdown gracefully in an App Engine.

app.get('/_ah/stop', (req, res) => {
  console.info('Shutting down.');
  server.close();
  res.send();
});

app.get('/_ah/start', (req, res) => {
@ezequieltejada
ezequieltejada / sampleREADME.md
Created September 12, 2022 16:36 — forked from FrancesCoronel/sampleREADME.md
A sample README for all your GitHub projects.

Repository Title Goes Here

Frances Coronel

INSERT GRAPHIC HERE (include hyperlink in image)

Subtitle or Short Description Goes Here

ideally one sentence >

@ezequieltejada
ezequieltejada / subscribeExample.ts
Created June 29, 2022 08:14
Handling subscriptions in Angular components
import { Component, OnInit } from '@angular/core';
import { Service } from '../services/service';
@Component({
selector: 'selector-name',
templateUrl: 'name.component.html'
})
export class NameComponent implements OnInit, OnDestroy {
subscriptions$: SubscriptionLike[] = [];