Skip to content

Instantly share code, notes, and snippets.

View gopal1996's full-sized avatar
🏠
Working from home

Gopalakrishnan gopal1996

🏠
Working from home
View GitHub Profile
  1. To render 60 frames every 1000ms, how much time is available to render a single frame? a. 100ms b. 20ms c. 16ms d. 30ms Ans: 16ms

  2. What is the TTFB? a. Time to First Bit b. Time to First Byte

OpenStack (DevStack) Installation

  • Install ubuntu OS
  • Login to ubuntu

Add User

sudo useradd -s /bin/bash -d /opt/stack -m stack

Install Hadoop on Ubuntu

  • Install ubuntu OS
  • Login to ubuntu
  • Switch to root

Create user

# adduser hadoop

Devkode CSS Session

Challenge 1

Create a below design without modifing HTML elements

<div class="wrapper">
  <div class="box a">A</div>
  <div class="box b">B</div>
 C

Recently I came to know about Reflow and Repaint. How it's affecting web performance. I am writing this post to give insights about reflow and repaint. Before Jumping into the topic, let's understand how the browser renders the website.

Group 1

  • When the user enters the URL, It will fetch the HTML source code from the server
  • Browser Parse the HTML source code and convert into the Tokens (<, TagName, Attribute, AttributeValue, >)
  • The Tokens will convert into the nodes and will construct the DOM Tree
  • The CSSOM Tree will generate from the CSS rules
  • The DOM and CSSOM tree will combine into the RenderTree
@gopal1996
gopal1996 / ES6_Set.md
Last active September 12, 2020 07:17

Set

Sets are a new object type which allow to create collections of unique values. The values in a set can be either primitives like strings or integers and non-primitives like object literals or arrays.

const set = new Set([10, 10, 20, 30, 'Tom', {name: 'Mike'}]);
console.log(set);

Output:

Hoisting

Quiz 1

console.log(boo);
var boo = "boo";

var boo;
console.log(boo);
boo = "boo";

VAR vs LET vs CONST

VAR

In Javascript, when you declare variable using var keyword

  • The variable declared using var keyword outside the function are global scope.
  • The variable declared using var keyword within the function are function scope
  • The variable declared using var keyword will get hoisted
console.log(instagramId) // undefined
@gopal1996
gopal1996 / ES6_Map.md
Last active September 12, 2020 07:16

Map

  • The Map object holds key-value pairs and remembers the original insertion order of the keys
  • Any value (both objects and primitive values) may be used as either a key or a value
const map = new Map([
    ['1', 'string'],
    [1, 'number'],
 [true, 'boolean']

VAR

The var statement declares a function-scoped or globally-scoped variable, optionally initializing it to a value. Variables declared with var can be reassigned and redeclared in the same scope.

var name = 'Devkode'; // Global Scope
function greet() {
    var message = 'Hello!!'; // Function Scope
 console.log(name); // Output: Devkode