Skip to content

Instantly share code, notes, and snippets.

View saurabhnemade's full-sized avatar
👨‍🚀
Building Awesome Software Ideas.

Saurabh Nemade saurabhnemade

👨‍🚀
Building Awesome Software Ideas.
View GitHub Profile
@saurabhnemade
saurabhnemade / createStore.js
Created August 13, 2019 03:38
Dynamic Redux Reducers - 3
import { createStore as _createStore, combineReducers } from 'redux';
import get from 'lodash/get';
import set from 'lodash/set';
const copy = (source, deep) => {
var o, prop, type;
if (typeof source != 'object' || source === null) {
// What do to with functions, throw an error?
o = source;
@saurabhnemade
saurabhnemade / createStore.js
Last active August 13, 2019 03:36
Dynamic Redux Reducer - 2
import { createStore as _createStore, combineReducers } from 'redux';
import rootReducer from ‘./rootReducer’;
const dynamicActionGenerator = () => {
return '@@TEST-REDUCER-VALIDITY/' + Math.random().toString(36).substring(7).split('').join('\\');
};
const isValidReducer = (reducer, throwError = false) => {
if (typeof reducer !== 'function') {
if (throwError) {
@saurabhnemade
saurabhnemade / store.js
Created August 13, 2019 03:35
Dynamic Redux Reducers - 1
import { createStore, combineReducers } from 'redux';
import rootReducer from ‘./rootReducer’;
export default createStore(rootReducer);
@saurabhnemade
saurabhnemade / gist:94a69247c5d219b207283b72c09d7954
Created July 5, 2019 14:14 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@saurabhnemade
saurabhnemade / git.migrate
Created May 17, 2018 19:17 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.