Skip to content

Instantly share code, notes, and snippets.

View cjosue15's full-sized avatar
🏠
Working from home

Carlos Morales cjosue15

🏠
Working from home
View GitHub Profile
@cjosue15
cjosue15 / Useful-Mac-Commands.sh
Created January 14, 2024 22:19 — forked from garethnunns/Useful-Mac-Commands.sh
Useful Mac Commands
# disable sleep when lid closed
sudo pmset -b sleep 0; sudo pmset -b disablesleep 1
# re-enable sleep when lid closed
sudo pmset -b sleep 5; sudo pmset -b disablesleep 0
# prevent Photos opening when SD inserted
defaults -currentHost write com.apple.ImageCapture disableHotPlug -bool YES
# speed up Time Machine backups
@cjosue15
cjosue15 / interceptor-refresh.interceptor.ts
Created March 5, 2022 00:21
Interceptor with token refresh
import { Injectable } from "@angular/core";
import {
HttpEvent,
HttpInterceptor,
HttpHandler,
HttpRequest,
HttpErrorResponse
} from "@angular/common/http";
import { throwError, Observable, BehaviorSubject, of, finalize } from "rxjs";
import { catchError, filter, take, switchMap } from "rxjs/operators";
@cjosue15
cjosue15 / flutter-build-apk.txt
Last active December 16, 2021 02:58
Flutter Build Apk
flutter build apk --build-name=1.0.0 --build-number=1
@cjosue15
cjosue15 / _redirects
Created September 27, 2021 21:44 — forked from dance2die/_redirects
/* /index.html 200
@cjosue15
cjosue15 / gist:41eca467cae8e25923dae6555b53f57b
Created January 22, 2021 15:57
shadow that i always use
.x {
box-shadow: 0px 0px 10px -2px rgba(0,0,0,0.07);
}
@cjosue15
cjosue15 / pm2.txt
Last active July 22, 2021 04:51
pm2 configuracion basica
npm i -g pm2
# Se debe ejecutar este comando para inicar pm2 y siempre se quede ejecutando el archivo, pero si el servidor
# se reinicia se cae tambien esto
pm2 start index.js --name <nombre>
# Para listar
pm2 list
# Para detener
@cjosue15
cjosue15 / scroll-y Auto
Created November 3, 2020 21:21
Auto scroll when it's needed
.tableScroll {
overflow-y: auto;
height: 450px;
max-height: 450px;
}
@cjosue15
cjosue15 / google-btn.html
Created November 3, 2020 01:25 — forked from Klerith/google-btn.html
Botón de Google
<div
className="google-btn"
>
<div className="google-icon-wrapper">
<img className="google-icon" src="https://upload.wikimedia.org/wikipedia/commons/5/53/Google_%22G%22_Logo.svg" alt="google button" />
</div>
<p className="btn-text">
<b>Sign in with google</b>
</p>
</div>
@cjosue15
cjosue15 / Utils.js
Last active October 13, 2020 23:50 — forked from ch1nux/Utils.js
Javascript Utilities for several things
/**
* Dettached event handling for heavy CPU events (such resize or scroll)
* @param {Function} fn [Handler of the event]
* @param {Number} ms [Debounce time]
* @return {Function} [Debounced callback handler]
*/
export const debounce = (fn, ms = 0) => {
let timeoutId
return function(...args) {
@cjosue15
cjosue15 / README-español.md
Created August 30, 2020 03:34 — forked from Villanuevand/README-español.md
Una plantilla para hacer un buen README.md. Inspirado en el gist de @PurpleBooth => https://gist.github.com/PurpleBooth/109311bb0361f32d87a2

Título del Proyecto

Acá va un párrafo que describa lo que es el proyecto

Comenzando 🚀

Estas instrucciones te permitirán obtener una copia del proyecto en funcionamiento en tu máquina local para propósitos de desarrollo y pruebas.

Mira Deployment para conocer como desplegar el proyecto.