Skip to content

Instantly share code, notes, and snippets.

View SRatna's full-sized avatar

Sushanta Ratna Adhikari SRatna

  • Virtual Retail GmbH
  • Siegen, Germany
View GitHub Profile
@SRatna
SRatna / Random-string
Created May 4, 2018 04:41 — forked from 6174/Random-string
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
@SRatna
SRatna / Top 50 Universities List.md
Created April 29, 2018 03:27
Top 50 Computer Science Universities

Universities

Massachusetts Institute of Technology (MIT)

###phd###

  • MIT Graduate Admissions link
  • PhD Program - MIT Sloan School of Management link
  • MIT - Massachusetts Institute of Technology link
  • to view contact information for all departments. - MIT link
import snakeCase from 'lodash/snakeCase'
/**
* Convert a object with action creators created with
* redux-actions createAction to a object with these
* functions names as action types
*
* "someAction" becomes "SOME_ACTION"
*
* @param {Object} actions Object with action creators
/**
* Create valid redux reducer with action types as object keys and values as
* functions, instead of using Switch Statement
*
* Use it like this:
*
* `createReducer({
* // optional if you set a initial state as the second argument
* initialState: {},
*

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
@SRatna
SRatna / scrapySetup.txt
Last active August 16, 2017 11:39
Set up for scrapy
I used anaconda as my python vendor.
So first install anaconda.
Then set path in .profile in home directory.
--> PATH="$HOME/bin:$HOME/.local/bin:$HOME/anaconda3/bin:$PATH"
then create a virtual environment using conda as
: conda create --name your_name_for_env
this will create named env directory inside anaconda3/envs
do source activate your_name_for_env
then pip install scrapy
@SRatna
SRatna / gunicorn-flask.txt
Created June 27, 2017 05:47
Steps I followed to set up gunicorn service in ubuntu for flask restless
I used anaconda as my python vendor.
So first install anaconda.
Then set path in .profile in home directory.
--> PATH="$HOME/bin:$HOME/.local/bin:$HOME/anaconda3/bin:$PATH"
then create a virtual environment using conda as
: conda create --name your_name_for_env python=3.4
this will create named env directory inside anaconda3/envs
do source activate your_name_for_env
now go to your project directory and install dependencies using pip as:
--> pip install -r requirements.txt