A Pen by shishir arora on CodePen.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TODO: LEARN:- | |
Learn about web security csrf etc, express-session, express-jwt-session | |
Difference between web socket and http | |
Service-worker | |
Mongodb | |
https://codeburst.io/why-you-don-t-need-socket-io-6848f1c871cd | |
https://blogs.adobe.com/creativecloud/a-primer-to-background-positioning-in-css/ | |
https://github.com/getify/You-Dont-Know-JS/blob/master/this%20%26%20object%20prototypes/ch5.md | |
https://medium.com/@nicknauert/mongooses-model-populate-b844ae6d1ee7 => mongoose | |
turn_off_js=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var providerSelector = document.querySelector("article"); | |
window.FindReact = function(dom) { | |
for (var key in dom) { | |
if (key.startsWith("__reactInternalInstance$")) { | |
var compInternals = dom[key]._currentElement; | |
var compWrapper = compInternals._owner; | |
var comp = compWrapper._instance; | |
return comp; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>AngularJS Tutorials</title> | |
<link rel="stylesheet" href="http://cdn.jsdelivr.net/foundation/5.4.7/css/foundation.css"> | |
</head> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.2/angular.js"></script> | |
<body> | |
<div ng-app="myApp"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="app"></app> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var imgEls = ''; | |
var queueCounter = 0; | |
var currentCounter = 0; | |
document.body.innerHTML = '<h1>Results</h1>'; | |
var callIfRequiredConfigured = ({cb,end,step=1,pageURL,pageId='Page'})=>callIfRequired = ()=>{ | |
currentCounter = currentCounter + step; | |
if (currentCounter > end) { | |
return; | |
} | |
(async(currentCounter)=>{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var imgEls = ''; | |
var queueCounter = 0; | |
var currentCounter = 0; | |
document.body.innerHTML = '<h1>Results</h1>'; | |
var callIfRequiredConfigured = ({cb,end,step=1,pageURL,pageId='Page'})=>callIfRequired = ()=>{ | |
currentCounter = currentCounter + step; | |
if (currentCounter > end) { | |
return; | |
} | |
(async(currentCounter)=>{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FLATTEN ARRAY | |
var flat = (arr)=>arr.reduce((r,a)=>Array.isArray(a)?[...r,...flat(a)]:[...r,a],[]); | |
console.log(flat([[8,9],7,[1],[8],[]])); | |
console.log(flat([{f:7},{a:6},[4,2,{}]])); | |
angular.element($0).scope(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Lighthouse = require('lighthouse'); | |
const ChromeLauncher = require('lighthouse/lighthouse-cli/chrome-launcher.js').ChromeLauncher; | |
const Printer = require('lighthouse/lighthouse-cli/printer'); | |
const _ = require('lodash'); | |
/** | |
* @param url | |
* @param flags | |
* @param config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Javascript: | |
No react lifecycle hooks (we can allow some cases in PR). | |
viz. componentWillReceiveProps(), shouldComponentUpdate(), componentWillUpdate(), componentDidUpdate(). | |
Components should have 90% html. | |
viz.: only render method, constructor,componentWill/DidMount | |
Business logic allowed only in Actions (all set logic) and selectors (all get logic). | |
NewerOlder