Skip to content

Instantly share code, notes, and snippets.

View nshganesh's full-sized avatar

Ganesh Hegde nshganesh

View GitHub Profile
@nshganesh
nshganesh / readme.md
Created May 11, 2018 12:01 — forked from yosukehasumi/readme.md
DigitalOcean Rails/Ubuntu/NGINX (16.04) Setup

DigitalOcean Rails/Ubuntu/NGINX (16.04) Setup

  1. Setup
  2. Swapfile
  3. NGINX
  4. ElasticSearch
  5. RVM
  6. Rails
  7. Postgres
  8. Capistrano
@nshganesh
nshganesh / deploy.rb
Created October 6, 2018 09:53
Mina configuration
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
# require 'mina/rbenv' # for rbenv support. (https://rbenv.org)
require 'mina/rvm' # for rvm support. (https://rvm.io)
# Basic settings:
# domain - The hostname to SSH to.
# fetch(:shared_paths) - Path to deploy into.
# repository - Git repo to clone from. (needed by mina/git)
//creating app
create-react-app app-name
// alias in .zshrc
alias rxreact="yarn add redux react-redux react-router react-router-dom connected-react-router
redux-observable rxjs redux-persist lodash.debounce normalizr redux-logger semantic-ui-css semantic-ui-react"
alias rxstructure="mkdir src/actions && touch src/actions/index.tsx && mkdir src/components &&
touch src/components/index.tsx && mkdir src/containers && mkdir src/containers/home && mkdir src/constants &&
Develop a simple form using react and redux. (Any middleware can be used. We prefer: redux-thunk, redux-saga, redux-logic)
Need to have these fields and a submit button.
Email (input), Name (input), Role (dropdown)(values -> [member, admin])
On submit store the information in a list.
You must validate email before storing.
Show all the users in a grid below the form.
Add button in grid item to delete the item.
All the information must be stored in redux.
You don't need to style any elements (no extra mark for that).
David Heinemeier Hansson's github url is https://github.com/dhh .
Github provides information about his public commits in JSON format at https://api.github.com/users/dhh/events/public .
In the JSON data there is an attribute called "type" which denotes what kind of commit it was.
Let's say that we give following score to DHH based on the "type" of the commit
IssuesEvent = 7
IssueCommentEvent = 6