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(
@finzaiko
finzaiko / ng2plus-pengenalan-typescript.md
Created January 4, 2018 09:39
Angular 2 plus - Pengenalan Typescript
@finzaiko
finzaiko / ng2plus-cli.md
Created January 4, 2018 09:35
Angular 2 plus - CLI
@finzaiko
finzaiko / ng2plus-membuat-komponen.md
Last active January 4, 2018 09:20
Angular 2 plus - Membuat Komponen

Dalam contoh ini kita membuat komponen/halaman about

1. Buat file typescript baru about.component.ts

import { Component } from '@angular/core';

@Component({
  selector: 'about',
  templateUrl: 'app/pages/about/about.html',
  styleUrls:  ['app/pages/about/about.css']
@finzaiko
finzaiko / ng2plus-setup-editor-vscode.md
Last active January 4, 2018 07:03
Angular 2 plus - Setup editor Visual Studio Code
@finzaiko
finzaiko / ng2plus-persiapan-dan-instalasi.md
Last active January 3, 2018 13:44
Angular 2 plus - Persiapan dan instalasi

1. Install NodeJS

From here --> https://nodejs.org/en/

2. Check npm version

Memastikan node/npm package sudah terinstall

npm -v

3. Install CLI