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 / 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.
@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 / 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 / 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 / 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
Created August 13, 2019 04:40
Dynamic Root Reducer - Final
import { createStore as _createStore, combineReducers } from 'redux';
import get from 'lodash/get';
import set from 'lodash/set';
const dynamicActionGenerator = () => {
return '@@TEST-REDUCER-VALIDITY/' + Math.random().toString(36).substring(7).split('').join('\\');
};
const isValidReducer = (reducer, throwError = false) => {
@saurabhnemade
saurabhnemade / cuda_10.0_installation_on_Ubuntu_18.04
Created November 1, 2019 08:58 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
Cuda 10.0 complete installation procedure for ubuntu 18.04 LTS
#!/bin/bash
## This gist contains step by step instructions to install cuda v10.0 and cudnn 7.5 in Ubuntu 18.04
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
@saurabhnemade
saurabhnemade / disable-autoboot-on-lid-open.sh
Created April 3, 2020 18:29
Disabling and enabling auto boot on lid open macbook
#!/bin/bash
sudo nvram AutoBoot=%00
{
"name": "root",
"private": true,
"workspaces": [
"packages/*"
],
"devDependencies": {
"lerna": "^3.20.2"
}
}
import React from 'react'
const buttonStyle = {
padding: '10px 20px'
};
const Button = (props) => {
return (
<button
className="btn btn-default"