Skip to content

Instantly share code, notes, and snippets.

View satyambnsal's full-sized avatar
🏠
remote work🤟

Satyam Bansal satyambnsal

🏠
remote work🤟
View GitHub Profile
@satyambnsal
satyambnsal / package.json
Created November 18, 2020 17:32 — forked from kentcdodds/package.json
setup script for my workshops
{
"name": "workshop-setup",
"version": "1.0.0",
"description": "This is the common setup script for most of my workshops",
"bin": "./setup.js"
}
@satyambnsal
satyambnsal / socket-cheatsheet.js
Created December 19, 2017 12:18 — 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