View translation-strings-to-ids.js
const readline = require('readline');
var ncp = require('copy-paste');
const inputMessage = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
// Promt to enter the string eg.
// This ain't your username, is it?
View routerSwitch.js
import React from 'react'
import ReactDOM from 'react-dom'
import ClientApp from './client-app'
import CustomerApp from './customer-app'
const extractSubdomain = host => {
const endSubdomain = host.indexOf('.localhost')
if (endSubdomain !== -1) {
return host.slice(0, endSubdomain)
}
View mustApps.md

List of must apps i use in my Linux PC

Sorted from top to down in order of installation

Package managers

View .gitignore
.apm/
.config.cson.swp
.github.cson.swp
.node-gyp/
blob-store/
compile-cache/
nohup.out
packages/
recovery/
storage/
View styling-readme.md

repo image

Styling Readme

Hit Raw to copy the content

Divider line

A clean divider line to segregate your sections.

color-line

View react-heroku.md

Creating heroku app with cli

heroku create $APP_NAME --buildpack https://github.com/mars/create-react-app-buildpack.git

with npx

npx heroku-cli create $APP_NAME --buildpack https://github.com/mars/create-react-app-buildpack.git
View task.js
const inputString =
'[ "AND", ["<", "var1", "var2"], [ "OR", [">", "var3", "var4"], ["==", "var5", "var6"] ] ]'
let cleanedString = ''
for (var i = 0; i < inputString.length; i++) {
if (
inputString[i] !== '[' &&
inputString[i] !== ']' &&
inputString[i] !== '"'
) {
View task.js
const inputString =
'[ "AND", ["<", "var1", "var2"], [ "OR", [">", "var3", "var4"], ["==", "var5", "var6"] ] ]'
let cleanedString = ''
for (var i = 0; i < inputString.length; i++) {
if (
inputString[i] !== '[' &&
inputString[i] !== ']' &&
inputString[i] !== '"'
) {
View Effective_Engineer.md

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

View Steps.md
  • On Frontend
    • User clicks Login With Github Button.
    • We redirect user to https://github.com/login/oauth/authorize with client_id, redirect_uri and scope as query params.
    • Example
      https://github.com/login/oauth/authorize?scope=user:email&client_id=<CLIENT_ID>&state=<state>
      
    • Once user allows access github redirect back us to supplied redirect_uri with code as query parameter.
    • Example