Skip to content

Instantly share code, notes, and snippets.

Ali Yusuf AliYusuf95

Block or report user

Report or block AliYusuf95

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
AliYusuf95 / interfaces.mongo-options.interface.ts
Created Sep 8, 2019
MongoDB driver module for NestJS with dynamic mongo connection creation per request and handling open connections
View interfaces.mongo-options.interface.ts
import { ModuleMetadata, Type } from '@nestjs/common/interfaces'
* Options that ultimately need to be provided to create a MongoDB connection
export interface MongoModuleOptions {
connectionName?: string
uri: string
dbName: string
clientOptions?: any
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.Configuration;
import android.os.Build;
import android.provider.Settings;
import android.telephony.TelephonyManager;
AliYusuf95 /
Last active May 7, 2017
RxJava event bus implementation with subscribing and unsubscribing.
import java.util.HashMap;
import java.util.Map;
import io.reactivex.Observable;
import io.reactivex.disposables.CompositeDisposable;
import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer;
import io.reactivex.functions.Predicate;
import io.reactivex.subjects.PublishSubject;
AliYusuf95 /
Last active Jan 26, 2020
Websocket implementation using OkHttp3 with {event->data} message format to make your life easier.
public interface OnEventListener {
* Invoked when new message received from websocket with {event, data} structure
* @param data Data string received
void onMessage(String data);
You can’t perform that action at this time.