Skip to content

Instantly share code, notes, and snippets.

View salazarr-js's full-sized avatar

Jose Salazar salazarr-js

View GitHub Profile
@salazarr-js
salazarr-js / README.md
Last active May 15, 2026 23:14
Multi-identity GitHub setup on one machine — folder-based SSH/git routing for personal + work accounts

Multiple GitHub identities on one machine

How to route git/SSH between two (or more) GitHub accounts automatically, based on which folder a repo lives in. After setup, every git clone / git push in the right folder uses the right identity — no per-repo configuration.

Tested on macOS, works the same on Linux. On Windows use Git Bash / WSL.

What this solves

You have multiple GitHub accounts — e.g. personal (youruser) and work (youruser-work) — and one machine. Without this setup, every push uses whichever SSH key was added first to the agent, so half your pushes are rejected with "you don't have permissions to push to X / would you like to create a fork?".

@salazarr-js
salazarr-js / main.scss
Created September 18, 2024 18:18
Scss theme mixin
@mixin theme($theme) {
@at-root #{selector-nest(':root[data-theme=#{$theme}]', &)} {
@content;
}
}
:root {
--bg-color: lightcoral;
}
@salazarr-js
salazarr-js / tailwind-preflight.css
Created January 24, 2023 13:07
Tailwind preflight
/* ! tailwindcss v3.2.4 | MIT License | https://tailwindcss.com */
*,
::before,
::after {
box-sizing: border-box;
border-width: 0;
border-style: solid;
border-color: #e5e7eb;
content: '';
@salazarr-js
salazarr-js / playwright.ts
Last active November 17, 2022 17:58
Playwright lib hook
import { chromium, LaunchOptions } from 'playwright'
import type { Browser, BrowserContext, Page } from 'playwright'
/** */
type UsePlaywrightCallback = (opt: { browser: Browser, ctx: BrowserContext, page: Page }) => Promise<void>
/** Expose a `playwright` browser, context and page to a callback that automatically close after finishing */
export async function usePlaywright(cb: UsePlaywrightCallback): Promise<void> {
@salazarr-js
salazarr-js / README.md
Last active August 26, 2022 22:28
Windi/Tailwind scss

Windi/Tailwind scss

List of useful Windi/Tailwind variables and utils ready to use.

Colors

Just import in your .scss file

@use "./colors" as *;
@salazarr-js
salazarr-js / readme.md
Last active May 15, 2026 23:10
Flutter Knowledge
@salazarr-js
salazarr-js / 1_README.md
Last active September 8, 2024 23:05
Validaciones avanzadas y personalizadas de formularios en Ionic 3 y Angular 4

Validaciones avanzadas y personalizadas de formularios en Ionic 3 y Angular 4

Los formularios son la piedra angular de nuestra aplicaciones, ya sean de escritorio, moviles o web, esto equivale a una interaccion entre el usuario y nuestra aplicacion, independiente de su fin, es la manera idónea con la que el usuario se puede comunicar con nuestra aplicacion.

Por consiguiente es de vital importancia validar la informacion que el usuario introduce en nuestros formularios, para evitar o prevenir posibles errores con dicha informacion. De igual manera es una excelente practica de experiencia de usuario, mostrarle o informarle al usuario que esta introduciendo un dato incorrecto o que se espera algun tipo de respuesta diferente.

Actualmente en Angular existen dos modos de validar los formularios, por modelo y por template, este ejemplo es por template o plantilla, puedes revisar el siguiente tutorial para aplicar tus validaciones en el modelo.

Los siguientes pasos son para ilustrar una maner