Skip to content

Instantly share code, notes, and snippets.

View tarun-nagpal-github's full-sized avatar
💭
Code is like humor. When you have to explain it, it’s bad.

Tarun Nagpal tarun-nagpal-github

💭
Code is like humor. When you have to explain it, it’s bad.
View GitHub Profile
echo "**************Setting the Setup for Tarun Nagpal***********"
echo " *** Setting Up Git **** "
git config --global user.name "tarun-nagpal"
git config --global user.password "11/mar/86"
echo " *** Reset Npm **** "
npm logout
@tarun-nagpal-github
tarun-nagpal-github / before_deploy.yml
Last active September 27, 2020 16:41
before_deploy.yml
before_deploy: "echo 'I am ready to deploy to S3 Bucket'"
deploy:
access_key_id: $access_key_id
bucket: build.realmelon.com
local_dir: out/build/source
provider: s3
region: eu-central-1
secret_access_key: $secret_access_key
skip_cleanup: true
git:
submodules: false
before_script:
- "echo 'Before Script - Started'"
- "echo -e \"machine github.com\\n login $CI_USER\\n password $CI_USER_PASSWORD\" > ~/.netrc"
- "sudo apt update"
- "sudo apt install npm"
- "sudo npm install --g lerna"
- "sudo npm install"
- "sudo ln -s /home/travis/.nvm/versions/node/v14.4.0/bin/node /usr/bin/node"
- "node --version"
language: node_js
node_js:
- 14.4.0
before_install:
- "echo \"Set password from Env Variables\""
- "echo -e \"machine github.com\\n login $CI_USER\\n password $CI_USER_PASSWORD\" > ~/.netrc"
- "git submodule update --init --recursive"
- "npm i -g lerna"
- "echo \"before install ended !!!!\""
import React from 'react';
import './App.css';
import { useSelector } from "react-redux";
import { useDispatch } from "react-redux";
function App() {
const globalState = useSelector(state => state);
const dispatch = useDispatch();
const getUserData = () => {
// Get the Data for the User
@tarun-nagpal-github
tarun-nagpal-github / results-after-search-result.json
Created April 26, 2020 15:02
results-after-search-result.json
{
"code":"0",
"message":"Success",
"payload":{
"itemDTOs":[
{
"id":1,
"price":600089,
"unitSize":"4",
"name":"MamyPoko X-tra Kering - NB-S 44 - Popok Perekat updated",
{
"code":"0",
"message":"Success",
"payload":[
{
"id":1,
"price":600089,
"unitSize":"4",
"name":"MamyPoko X-tra Kering - NB-S 44 - Popok Perekat updated",
"sellerName":"Ibu and Bayi",
@tarun-nagpal-github
tarun-nagpal-github / js-interview-puzzles.js
Last active March 26, 2020 11:42
JavaScript - Interview Puzzles
// What is the output and Why
const myData = [1,2,3,4];
console.log(myData[4]);
// Answer - undefined
// What is the code below doing and how we can optimize it
const items = document.querySelctorAll('#container > div');
items.forEach(el => {