Skip to content

Instantly share code, notes, and snippets.

@finzaiko
finzaiko / socket-cheatsheet.js
Created February 10, 2020 01:36 — 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
@finzaiko
finzaiko / infinite_listview.dart
Created June 28, 2018 04:46 — forked from MarcinusX/infinite_listview.dart
This is source code for a blog post.
import 'dart:async';
import 'package:flutter/material.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return new MaterialApp(