Skip to content

Instantly share code, notes, and snippets.

View megahertz's full-sized avatar
:electron:

Alexey Prokhorov megahertz

:electron:
View GitHub Profile
@megahertz
megahertz / mongo-url.sh
Created February 28, 2018 04:10
Parse MongoDB connection string in bash
#!/usr/bin/env bash
set -e
# Usage: parse_mongo_url URL
# It sets the following variables:
# MONGO_HOST
# MONGO_PORT
# MONGO_DATABASE
# MONGO_USER
# MONGO_PASSWORD
@megahertz
megahertz / MobxRnnProvider.js
Last active January 11, 2020 09:56
This is a provider which allows to use mobx-react Provider with wix/react-native-navigation.
import { Provider } from 'mobx-react/native';
const SPECIAL_REACT_KEYS = { children: true, key: true, ref: true };
export default class MobxRnnProvider extends Provider {
props: {
store: Object
};
context: {