Skip to content

Instantly share code, notes, and snippets.

View Sh1d0w's full-sized avatar
👨‍💻

Sh1d0w Sh1d0w

👨‍💻
  • 7 of D
  • Earth
View GitHub Profile
@Sh1d0w
Sh1d0w / StreamMixer.ts
Created June 9, 2021 11:43 — forked from grishgrigoryan/StreamMixer.ts
StreamMixer helps to play with MediaStream: Merge multiple streams into single one ( can be used with WebRtc to send multiple streams over a single WebRTC MediaConnection, or to switch streams without worrying about renegotiation)
export class StreamMixer {
streams: Array<{
id: string,
audioSource: any,
gainNode: any,
mediaStream: MediaStream
}>;
destination: any;
audioCtx: any;

Make sure these boxes are checked before submitting/approving the PR

General

  • The code works
  • The code is easy to understand
  • Follows coding conventions
  • Names are simple and if possible short
  • Names are spelt correctly
  • Names contain units where applicable
  • There are no usages of magic numbers
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/scheduler.dart';
void main() => runApp(ExampleApp());
class ExampleApp extends StatelessWidget {
@override
// BLOC
class ErrorBloc extends Bloc<ErrorBlocEvent, ErrorBlocState> {
@override
Stream<ClaimState> mapEventToState(ErrorBlocState currentState, ErrorBlocEvent event) async* {
if (event is SomeEvent) {
yield Processing();
final result = await _doSomething();
if(result.success) {
yield Success();
@Sh1d0w
Sh1d0w / Readme.md
Last active April 6, 2020 03:53 — forked from StefanieD/Readme.md
[Supervisor Configuration] Install and use Supervisord with AWS Elastic Beanstalk, Symfony 2 and RabbitMq Bundle
  • Place the supervisord.conf under .ebextensions/supervisor/

  • Place the supervisor.config under .ebextensions/

  • Place the data_import_consumer.conf under .ebextensions/supervisor/

@Sh1d0w
Sh1d0w / gradient_text.dart
Created December 14, 2018 08:14 — forked from knezzz/gradient_text.dart
Gradient text in Flutter
class GradientText extends StatelessWidget {
const GradientText(this.text, {
Key key,
@required this.gradient,
this.style = const TextStyle(),
}) : super(key: key);
final String text;
final TextStyle style;
final Gradient gradient;
@Sh1d0w
Sh1d0w / README.md
Created September 26, 2016 18:25 — forked from addyosmani/README.md
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version