Skip to content

Instantly share code, notes, and snippets.

View fr20587's full-sized avatar
🚀
Building a dream!

Frank Rodríguez López fr20587

🚀
Building a dream!
View GitHub Profile
@fr20587
fr20587 / api-methods.md
Last active January 17, 2024 16:47
Athwire API Encrypt

Proceso de cifrado

Dependencias

Paquetes de nodejs para manejar el cifrado y la validación

Para instalarlos ejecutar:

npm i crypto-js       # para el cifrado

Para usuarios de Windows que necesiten utilizar el paquete de node "cross-env"

Deben instalar el paquete complementerios win-node-env

npm i -g win-node-env

Aunque se recomienda instalarlo de manera global tambien se puede instalar como un una dependencia del proyecto.

@fr20587
fr20587 / steps.md
Last active January 26, 2026 14:03
Pasos para configurar proxy para NPM
@fr20587
fr20587 / nestjs-heroku-deploy.md
Last active July 13, 2022 14:09
Esta es una breve decripcion de los pasos a seguir para desplegar aplicaciones de NestJS en Heroku

Install Heroku-cli

    npm i heroku

Add Heroku git to local remote

 heroku git:remote -a 
@fr20587
fr20587 / module.ts.md
Last active March 25, 2024 20:41
Estos archivos tienen una guia de como traducir el componente Mat-Paginator de Angular Material al español, pero pueden ser utilizados para traducir el componente a cualquier idioma. Solo piense un poco, no hace daño. 😎

Import on module

import { MatPaginatorIntl, MatPaginatorModule } from '@angular/material/paginator';
import { getSpanishPaginatorIntl } from '....../spanish-paginator-intl';

Set provider

providers: [
 { provide: MatPaginatorIntl, useValue: getSpanishPaginatorIntl() }
@JustDoItSascha
JustDoItSascha / pwa.service.ts
Last active September 16, 2022 23:15
Splash Screen for Angular 8+ PWA
@Injectable({
providedIn: 'root'
})
export class PwaService {
constructor(
private appRef: ApplicationRef,
private swUpdate: SwUpdate,
) {
if (this.swUpdate.isEnabled) {
@arielweinberger
arielweinberger / strong-password-regex.md
Last active January 13, 2026 07:20
Strong password Regular Expression - NestJS Course
  • Passwords will contain at least 1 upper case letter
  • Passwords will contain at least 1 lower case letter
  • Passwords will contain at least 1 number or special character
  • There is no length validation (min, max) in this regex!

Regular expression for JavaScript:

/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/
@ValentinFunk
ValentinFunk / README.md
Created January 18, 2019 09:58
Fixes SVG Gradients for Safari by changing fill URLs to the current pathname. Also fixes xlink:href URLs.

Snippet to fix SVG issues in Angular (2+) with Safari, Firefox and Chrome

This listens to Angular route changes and on route change does the following:

  1. Replaces the link in <use xlink:href="#some-id"></use> by a path prefixed version
  2. Replaces the fill property in referenced SVGs by a path prefixed version
  3. Replaces the style in <svg style="fill: url(#gradient)"> with a prefixed version

Adapted from Gist by Leon Derijke

@uorat
uorat / nginx-websocket-proxy.conf
Last active September 26, 2024 15:57
Nginx Reverse Proxy for WebSocket
upstream websocket {
server localhost:3000;
}
server {
listen 80;
server_name localhost;
access_log /var/log/nginx/websocket.access.log main;