Posts

Deploying Node.js on Amazon EC2

Image
Node.js application deployment on EC2  :  1. Create an EC2 instance. 2. Connect to your EC2 instance ex: ssh -i <your-key.pem> ec2-user@<your-ec2-public-ip> Step 1:  Install NodeJS & NPM using nvm :   please run these command to deploy node js application --> 1.  sudo su - 2.  curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash Activate NVM 3.  . ~/.nvm/nvm.sh   install node js latest version--> 4.   nvm install node Install Git : 5.   sudo apt-get update -y 6.   sudo apt-get install git -y Run below command to clone  repository from Github: :  7.  git clone https://github.com/vakilsingh12/file-uploadNode.git inside directory install package :  8 . cd  file-uploadNode 9.    npm install 10.  npm start Run Node App as Background Service Using PM2 Run following command to run app as background :  11.   sudo npm install -g pm2 12. sudo pm2 install pm2-logrotate 13. sudo pm2 start app.js --name node-app check status of the application usi

JavaScript coding Interview Question

Image
  JS CODE PRACTICE INTERVIEW QUESTION ES6 (also known as ECMAScript 2015) is the sixth edition of the ECMAScript language specification, which is used to define the scripting language used by web browsers. It introduced many new features and syntax improvements to JavaScript that make it easier and more intuitive to write complex applications. In this article, we'll explore some of the most important concepts introduced by ES6 and how they can be used to write better JavaScript code. ES6 JS => let and const Arrow functions Classes Destructuring Template literals Spread operator Default parameters Rest parameters Object shorthand notation Promises Modules Maps and Sets Iterators and Generators. 1. Find a max element in the array using reduce method. const arr=[1,7,3,48,10,39]; const data=arr.reduce((acc,curr)=>{ if(acc<curr){ acc=curr } return acc },0) console.log(data); o/p => 48 2. Counting occurrences of values in an array of objects based on a specific property.

DATA STRUCTURE Code PRACTICE (DSA)

Image
DATA STRUCTURE CODE PRACTICE :  Data Structure  is a way to store and organize  data  so that it can be used efficiently .  For example, we can store a list of items using array,linked list,stack,queue,tree,graph. Fibonacci series ---------------------------------------------------------------------- #include <iostream> using namespace std; int main() {     int n=10;     int a=0,b=1;     cout<<a<<" "<< b<<" ";     for(int i=1;i<=10;i++){         int nextNumber=a+b;         cout<<nextNumber<<" ";         a=b;         b=nextNumber;     } } Prime Number --------------------------------------------------------------------------------- #include <iostream> using namespace std; int main() { int n=7; bool isPrime=0; for(int i=2;i<n;i++){ if(n%i==0){ isPrime=1; break; //bcz if it not prime we need to break } } if(isPrime){ cout&

INT 244 :: SECURING COMPUTING SYSTEMS

Image
   Unit I Introduction to Ethical Hacking: Hacking Evolution, What Is an Ethical Hacker?, Ethical hacking and Penetration testing, Hacking methodologies System Fundamentals: Fundamental of computer networks, Exploring TCP/IP ports, Understanding network devices, Proxies, Firewall and Network Security, Knowing Operating Systems (Windows, Mac, Android and Linux) Cryptography: History of cryptography, Symmetric cryptography, Asymmetric cryptography, Understanding Hashing, Issues with cryptography, Application of cryptography (IPsec, PGP, SSl) Unit II Footprinting: What is Footprinting, Threats Introduced by Footprinting, The Footprinting process, Using (Search engine, Google hacking, Social networking and Financial services) Information gathering Scanning: What is Scanning, Types of Scans, Family tree of Scans, OS fingerprinting, Countermeasure, Vulnerability Scanning and Using Proxies Unit III Enumeration: What is Enumeration, Windows Enumeration, Enumeration with SNMP, LDAP and Dir