Skip to content

Instantly share code, notes, and snippets.

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

Rizky Andhika rcdevgames

🏠
Working from home
View GitHub Profile
@rcdevgames
rcdevgames / blocs_provider.dart
Created February 7, 2019 13:18 — forked from putraxor/blocs_provider.dart
Multiple Blocs Provider for Flutter
import 'package:flutter/material.dart';
import 'package:model/blocs/base_bloc.dart';
/// Used to give [child] and all it's subsequent children access to [blocs].
/// To get a reference to 'SomeBloc' from a child use: BlocsProvider.of<SomeBloc>(context)
class BlocsProvider extends StatefulWidget {
BlocsProvider({Key key, @required this.child, @required this.blocs})
: super(key: key);
final Widget child;
@putraxor
putraxor / blocs_provider.dart
Created February 7, 2019 12:55
Multiple Blocs Provider for Flutter
import 'package:flutter/material.dart';
import 'package:model/blocs/base_bloc.dart';
/// Used to give [child] and all it's subsequent children access to [blocs].
/// To get a reference to 'SomeBloc' from a child use: BlocsProvider.of<SomeBloc>(context)
class BlocsProvider extends StatefulWidget {
BlocsProvider({Key key, @required this.child, @required this.blocs})
: super(key: key);
final Widget child;
@nitisht
nitisht / minio-docker-steps.md
Last active September 25, 2023 03:04
minio-docker-swarm
  • Pre-Conditions: https://docs.docker.com/engine/swarm/swarm-tutorial/#/three-networked-host-machines For distributed Minio to run, you need 4 networked host machines.

  • Create a new swarm and set the manager. SSH to one of the host machine, which you want to set as manager and run: docker swarm init --advertise-addr <MANAGER-IP>

  • Current node should become the manager. Check using: docker node ls

  • Open a terminal and ssh into the machine where you want to run a worker node.

  • Run the command as output by the step where master is created. It will add the current machine (as a worker) to the swarm. Add all the workers similarly.

  • Check if all the machines are added as workers, SSH to the master and run: docker node ls

Create an overlay network: