Skip to content

Instantly share code, notes, and snippets.

View jelcaf's full-sized avatar
🎯
Focusing

Jorge Carballo jelcaf

🎯
Focusing
View GitHub Profile
@jelcaf
jelcaf / sampleGenerator.js
Created July 17, 2020 12:24
Generator sample with async funcions
'use strict';
let times = 1;
let processed = 0;
async function searchUsers(skip) {
return new Promise((resolve) => {
setTimeout(() => {
if (skip > 32) {
return resolve([]);
}
@jelcaf
jelcaf / generator.ts
Created July 17, 2020 12:23
EventEmitter to Generator
import pauseable from 'pauseable';
import EventEmitter from 'events';
function iter(em) {
pauseable.resume(em);
return new Promise((resolve) => {
em.once('foo', (data) => {
pauseable.pause(em);
@jelcaf
jelcaf / gist:5045907
Last active March 1, 2019 16:13
Backup de repositorios Git
#!/bin/bash
###########################################
# Backup de aplicaciones git del servidor #
###########################################
#################
# Configuración #
#################
# Servidor
SERVER_IP=X.X.X.X
@jelcaf
jelcaf / gist:1476373
Last active March 1, 2019 16:13
Ignorar el salto de línea en Git
git config --system core.autocrlf input
@jelcaf
jelcaf / Operaciones-Git
Last active August 14, 2023 22:50
Git Tips - Mini-trucos de Git para facilitarme la tarea
#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1
#############################################
# Ver y descargar Ramas remotas