Skip to content

Instantly share code, notes, and snippets.

View heryvandoro's full-sized avatar
🏠
I may be slow to respond.

Hery Vandoro heryvandoro

🏠
I may be slow to respond.
View GitHub Profile
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
/**
* If the incoming request is an OPTIONS request
* we will register a handler for the requested route
*/
class CatchAllOptionsRequestsProvider extends ServiceProvider {
@heryvandoro
heryvandoro / socket-cheatsheet.js
Created July 27, 2017 06:12 — 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