Sign in

box-sizing defines how the width and height that gets applied to an element.


const junkFood = ['πŸ•', 'πŸ₯ͺ', 'πŸ”', '🍟']
let [pizza, sandwich, burger, fries] = junkFood
orlet item1, item2, item3
[item1,item2,,item3] = junkFood

//ES6 
function spreadExample(a,b,c) {
console.log(a) //πŸ“
console.log(b) //πŸ₯­
console.log(c) //πŸ‘
}
let arr = ['πŸ“','πŸ₯­','πŸ‘']
spreadExample(...arr)

Quick Byte: apply() in JS

//ES5
function applyExample(a,b,c) {
console.log(a) //πŸ“
console.log(b) //πŸ₯­
console.log(c) //πŸ‘
}
let arr = ['πŸ“','πŸ₯­','πŸ‘']
applyExample.apply(null,arr)

function restExample(a,b,…c) {
console.log(a) //πŸ“
console.log(b) //πŸ₯­
console.log(c[0]) //πŸ‘
console.log(c.length) //3
console.log(c.indexOf(apple)) //1
}
restExample('πŸ“','πŸ₯­','πŸ‘','πŸ‡','πŸ‰')

Error: git@github.com: Permission denied (publickey).

fatal: Could not read from remote repository.

Generating a new SSH key

In terminal, $ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

Press enter for all prompts

Adding your SSH key to the ssh-agent

$ eval "$(ssh-agent -s)"$ open ~/.ssh/config
> The file /Users/you/.ssh/config does not exist.
$ touch ~/.ssh/config

Open your ~/.ssh/config file, then modify the file, replacing ~/.ssh/id_rsa

Host *
AddKeysToAgent yes
UseKeychain yes
IdentityFile ~/.ssh/id_rsa
$ ssh-add -K ~/.ssh/id_rsa

Adding a new SSH key to your GitHub account

$ pbcopy < ~/.ssh/id_rsa.pub

Add SSH key to GitHub.

https://help.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account


$ npm install -g @angular/cli

ng new frontend

cd frontend

ng serve --open

ng add @angular/material



.   ____          _            __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_…

Create a new repository on the command line:

touch README.md

git init

git add README.md

git commit -m β€œinitial commit”

git remote add origin https://github.com/username/repo.git

git push -u origin master

Push an existing repository from the command line:

git remote add origin https://github.com/username/repo.git

git push -u origin master

Error: fatal: refusing to merge unrelated histories

git push origin master - -force


Variation 1: No Duplicates Allowed

Given an array of integers, return indices of the two numbers such that they add up to a specific target.

You may assume that each input would have exactly one solution, and you may not use the same element twice.

Example:

Given nums = [2…

Nisha

I am trying to be friends with programming.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store