Skip to content

Instantly share code, notes, and snippets.

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

Victor Manuel vickoman

🏠
Working from home
View GitHub Profile
@vickoman
vickoman / 0_reuse_code.js
Created April 14, 2014 01:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#############################################
# 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
@vickoman
vickoman / socket-cheatsheet.js
Created February 2, 2018 03:31 — forked from alexpchin/socket-cheatsheet.js
A quick cheatsheet for socket.io
// sending to sender-client only
socket.emit('message', "this is a test");
// sending to all clients, include sender
io.emit('message', "this is a test");
// sending to all clients except sender
socket.broadcast.emit('message', "this is a test");
// sending to all clients in 'game' room(channel) except sender