Skip to content

Instantly share code, notes, and snippets.

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

Atul Yadav AviKKi

🏠
Working from home
View GitHub Profile
@AviKKi
AviKKi / Initialize
Last active October 2, 2021 13:09
TS test notes
## Initialize
npx create-react-app . --template typescript
npm install @mui/material @emotion/react @emotion/styled
SLIDE 1
no if(!rating) rating = "Unrated coontent"
no rating = rating || "Unrated content"
yes rating = rating ?? "Unrated content"
SLIDE 2
The nullish coalescing operator (??) is a logical operator that returns its right-hand side operand when its left-hand side operand is null or undefined, and otherwise returns its left-hand side operand.
Unexpected behaviour is seen with logical OR(||) operator, as 0, "", [] etc. are treated as falsy value.
In previous example
SLIDE 1
Optional Chaining ?.
SLIDE 2
When you try to access a property of undefined or null you'll get an error
```js
const user1 = {
username: 'avikki_coder',
address: {
city: 'Banglore',
# installation
# source - https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_linux.html
# source - https://docs.openvinotoolkit.org/latest/_docs_install_guides_installing_openvino_apt.html
# Add Key
wget -qO - https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB | sudo apt-key add -
sudo bash -c 'echo "deb https://apt.repos.intel.com/openvino/2019/ all main" > /etc/apt/sources.list.d/intel-openvino-2019.list'
sudo apt update
# to-do: write a script to download latest version of openvino from apt-cache search result
sudo apt-cache search intel-openvino-dev-ubuntu18
sudo apt install intel-openvino-dev-ubuntu18-2019.3.376
@AviKKi
AviKKi / Setting up ssh server for port forwarding
Last active December 29, 2020 15:48
Practical aspects of using SSH tunneling are demostrated here, which can potentially replace services like ngrok, localtunnel, DDNS etc.
by default ssh daemon's config are stored in `/etc/ssh/sshd_config` and does not allow port forwarding, to enable it set `AllowTcpForwarding yes` and also `GatewayPorts yes`
#!/bin/sh
# udpate apt
sudo apt-get update
# install certificates & add repository
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# update apt
This file has been truncated, but you can view the full file.
{
"warnings": [],
"errors": [],
"info": [],
"products": [
{
"url": "https://www.almaenpena.es/products/sandalia-plana-paulina-turq?taxon_id=110",
"title": "PAULINA",
"code": "V18429",
"categories": [