Featured

TechBytes on Linux

This is a growing list of Linux commands which might come handy for the of Linux users. 1. Found out i had to set the date like this: ...

Thursday, May 5, 2022

Difference Between a Data Leak and a Data Breach

 A data breach is the outcome of a planned cyber attack, but a data leak is the accidental exposure of sensitive data by a business. Cybercriminals do not create data leaks, they discover them and then use them to launch data breach attacks. 

Data leaks tend to result from poor security practices. A business can also be impacted if any of its vendors have a data leak. Because these vulnerabilities occur throughout a vast attack landscape they’re difficult to detect and remediate before it’s too late. 

Without a sophisticated data protection solution, businesses will remain vulnerable to data breaches through their third-party network.

Courtesy - www.upgaurd.com 

Wednesday, February 16, 2022

Type or Category or Classification of Design Patterns

 Type or Category or Classification of Design Patterns

Creational  Based on the concept of creating an object.
    Class
      Factory MethodThis makes an instance of several derived classes based on interfaced data or events.
    Object
      Abstract FactoryCreates an instance of several families of classes without detailing concrete classes.
      BuilderSeparates object construction from its representation, always creates the same type of object.
      PrototypeA fully initialized instance used for copying or cloning.
      SingletonA class with only a single instance with global access points.
        
  Structural  Based on the idea of building blocks of objects.
    Class
      AdapterMatch interfaces of different classes therefore classes can work together despite incompatible interfaces.
    Object
      AdapterMatch interfaces of different classes therefore classes can work together despite incompatible interfaces.
      BridgeSeparates an object's interface from its implementation so the two can vary independently.
      CompositeA structure of simple and composite objects which makes the total object more than just the sum of its parts.
      DecoratorDynamically add alternate processing to objects.
      FacadeA single class that hides the complexity of an entire subsystem.
      FlyweightA fine-grained instance used for efficient sharing of information that is contained elsewhere.
      ProxyA place holder object representing the true object.
 
  Behavioral  Based on the way objects play and work together.
    Class
      InterpreterA way to include language elements in an application to match the grammar of the intended language.
      Template
       Method
Creates the shell of an algorithm in a method, then defer the exact steps to a subclass.
    Object
      Chain of
      Responsibility
A way of passing a request between a chain of objects to find the object that can handle the request.
      CommandEncapsulate a command request as an object to enable, logging and/or queuing of requests, and provides error-handling for unhandled requests.
      IteratorSequentially access the elements of a collection without knowing the inner workings of the collection.
      MediatorDefines simplified communication between classes to prevent a group of classes from referring explicitly to each other.
      MementoCapture an object's internal state to be able to restore it later.
      ObserverA way of notifying change to a number of classes to ensure consistency between the classes.
      StateAlter an object's behavior when its state changes.
      StrategyEncapsulates an algorithm inside a class separating the selection from the implementation.
      VisitorAdds a new operation to a class without changing the class.

 

Difference between webstorage, cookie, local storage & session storage

WebStorage

The Window object implements the WindowLocalStorage and WindowSessionStorage objects which has localStorage(window.localStorage) and sessionStorage(window.sessionStorage) properties respectively. These properties create an instance of the Storage object, through which data items can be set, retrieved and removed for a specific domain and storage type (session or local). For example, you can read and write on local storage objects as below

localStorage.setItem('logo', document.getElementById('logo').value);

localStorage.getItem('logo');

What are the differences between cookie, local storage and session storage

Below are some of the differences between cookie, local storage and session storage,

FeatureCookieLocal storageSession storage
Accessed on client or server sideBoth server-side & client-sideclient-side onlyclient-side only
LifetimeAs configured using Expires optionuntil deleteduntil tab is closed
SSL supportSupportedNot supportedNot supported
Maximum data size4KB5 MB5MB

Wednesday, February 2, 2022

Cloud Computing basics

SaaS - Software as a Service

is on-demand access to ready-to-use, cloud-hosted application software.

E.g. Google Docs, Google Form, Google Spreadsheet. 


PaaS - Platform as a Service

is on-demand access to a complete, ready-to-use, cloud-hosted platform for developing, running, maintaining, and managing applications.

E.g. Amazon EC2 T2 Micro instances 1 GB memory & 1 vCPU under free tier, Microsoft Azure


IaaS - Infrastructure as a Service

The service provides all of the infrastructures to the business. It provides on-demand access to cloud-hosted physical and virtual servers, storage, and networking - the backend IT infrastructure for running applications and workloads in the cloud.

E.g. host.com that provides dedicated servers to organizations. VMware offers support for IaaS for carving out a system rack, network storage & computer into an isolated system for customers.


StaaS - Storage as a Service

E.g. Carbonite, Amazon S3

Storage as a service (STaaS) is a data storage business model where a provider rents storage resources to a customer through a subscription. STaaS saves you money through operating expenditure (OpEx) agility—you only pay for the storage you need, when you need it.

Private & Public Cloud

Amazon AWS is the poor man's public cloud due to its inexpensive pricing model & is the biggest provider.

HPE/Microsoft are mostly used by Enterprise companies as they hold their server on their enterprise public cloud data center are more responsive to their requests & allow them to perform service testing & site maintenance with escort service. 

GoDaddy - Cheaper public cloud-based hosting solutions though not as customizable as Amazon AWS. 

Critical custom data & sensitive IP, in-house information are kept in a Private cloud & the public-facing web server & catalog information is stored in the Public cloud (e.g. Akamai).

To offer more resilient services load balancing with VM on multiple cloud providers is a hot research topic.








Thursday, January 20, 2022

Top Competitive exams in India for students & professionals

I have compiled this list of some of the most prominent competitive entrance examinations for the benefit of students. (Source: Wikipedia & the internet)

 1. GRE

The Graduate Record Examinations (GRE) is a standardized test that is an admissions requirement for many graduate schools in the United States and Canada and few in other countries. The GRE is owned and administered by Educational Testing Service (ETS)

MBA

GRE score can be used for MBA programs in some schools.

The GMAT (Graduate Management Admission Test) is a computer-adaptive standardized test in mathematics and the English language for measuring aptitude to succeed academically in graduate business studies. Business schools commonly use the test as one of many selection criteria for admission into an MBA program. Starting in 2009, many business schools began accepting the GRE in lieu of a GMAT score. Policies varied widely for several years. However, as of the 2014–2015 admissions season, most business schools accept both tests equally. Either a GMAT score or a GRE score can be submitted for an application to an MBA program. Business schools also accept either score for their other (non-MBA) Masters and Ph.D. programs.

2. GATE

The Graduate Aptitude Test in Engineering (GATE) is an examination conducted in India that primarily tests the comprehensive understanding of various undergraduate subjects in engineering and science for admission into the Masters Program and Job in Public Sector Companies. GATE is conducted jointly by the Indian Institute of Science and seven Indian Institutes of Technologies at Roorkee, Delhi, Guwahati, Kanpur, Kharagpur, Chennai (Madras) and Mumbai (Bombay) on behalf of the National Coordination Board – GATE, Department of Higher Education, Ministry of Education (MoE), Government of India.


The GATE score of a candidate reflects the relative performance level of a candidate. The score is used for admissions to various post-graduate education programs (e.g. Master of Engineering, Master of Technology, Master of Architecture, Doctor of Philosophy) in Indian higher education institutes, with financial assistance provided by MHRD and other government agencies. Recently, GATE scores are also being used by several Indian public sector undertakings for recruiting graduate engineers in entry-level positions. It is one of the most competitive examinations in India. GATE is also recognized by various institutes outside India, such as Nanyang Technological University in Singapore.

Eligibility

The following students are eligible to take GATE:

Bachelor's degree holders in Engineering / Technology / Architecture (3 years after 10+2/ 10+2+3(ongoing)/ 10+2+4(ongoing)/ Post-B.Sc./ Post-Diploma) and those who are in the final year of such programs ( Also prefinal year of B.tech).

Master's degree holders in any branch of Science/Mathematics/Statistics/Computer Applications or equivalent and those who are in the final year of such programs.

Candidates in the second or higher year of Four-year integrated master's degree programs (Post-B.Sc.) in Engineering / Technology.

Candidates in the fourth or higher year of Five-year integrated master's degree programs or Dual Degree programs in Engineering / Technology.

Candidates with qualifications obtained through examinations conducted by professional societies recognized by UGC/AICTE (e.g. AMIE by IE(India), AMICE by the Institute of Civil Engineers (India)-ICE(I), AMIETE By IETE(India)) as equivalent to B.E./B.Tech.

A candidate who is currently studying in the 3rd or higher years of any undergraduate degree program OR has already completed any government-approved degree program


3. TOEFL

Test of English as a Foreign Language (TOEFL) is a standardized test to measure the English language ability of non-native speakers wishing to enroll in English-speaking universities. The test is accepted by more than 11,000 universities and other institutions in over 190 countries and territories. TOEFL is one of the two major English-language tests in the world, the other being the IELTS.

TOEFL is a trademark of the Educational Testing Service (ETS), a private non-profit organization, which designs and administers the tests. ETS issues official score reports which are sent independently to institutions and are valid for two years following the test.


4. IIT JEE

Joint Entrance Examination – Advanced (JEE-Advanced), formerly the Indian Institutes of Technology-Joint Entrance Examination (IIT-JEE), is an academic examination held annually in India. It is organized by one of the seven "old" IITs (IIT Roorkee, IIT Kharagpur, IIT Delhi, IIT Kanpur, IIT Bombay, IIT Madras, and IIT Guwahati)[3] under the guidance of the Joint Admission Board (JAB).

In 2013, the examination initially called the IIT-JEE was renamed to JEE (Advanced), and the AIEEE was renamed JEE (Main).

The eligibility criteria for taking the JEE (Advanced) exam are as follows:

Candidates should rank among the top candidates in Paper-1 of JEE (Main), broken down per category. For example, for JEE (Advanced) 2019, the top 250,000 were eligible, but only 46.5% of those were open for all, the rest being reserved for special categories.

Candidates should be less than 25 years of age, with five-year relaxation for SC, ST, and PwD candidates.

Candidates can attempt examination at most two times in two consecutive years.

Candidates should have qualified the Class XII Board Examination (or equivalent) in the previous year.

Candidates should not have accepted admission in any of the IITs earlier.

In addition, candidates are required to either be within the category-wise top 20th percentile of successful candidates in the Class XII Board Examination or secure a 75% mark (65% for SC (scheduled castes), ST (scheduled tribes), and PwD (people with disabilities).

Coaching

Preparation for the Joint Entrance Exam begins typically two to four years before students take the test. More than 90% of students who passed this exam attended coaching institutes, which had created a ₹232.61 billion industry with annual tuition of up to ₹200,000.

These academies included mock tests multiple times a week, up to 200 students per class, and long hours. ranging from 4 to 7 hours a day, in addition to regular high school work. There were hundreds of academies across the country, and the most famous—in Kota, Rajasthan—attracted approximately 125,000 students each year. 

Coaching programs are major corporations, listed on the Indian stock market and also attracting tens of millions of rupees of investment from private equity firms. 

The high-pressure environments at these coaching institutes have been blamed for a significant number of suicides.

A web series on Youtube & Netflix called Kota Factory depicts the situation of IIT aspirants effectively.


5.  Union Public Services Commission exams (UPSC exams)

I have compiled this list from Wikipedia for the benefit of students.

Gazetted Group A and B jobs exams

Union Public Service Commission, for Gazetted Group A and B jobs

Civil Services Examination (India) (CSE)

Combined Defence Services Examination (CDSE)

Combined Medical Services Examination (CMSE)

Indian Police Service Limited Competitive Examination (IPS LCE)

Special Class Railway Apprentice (SCRA)

Non-Gazetted Group B, C, D jobs exams

National Recruitment Agency (NRA), for Non-Gazetted Group B, C, D jobs

Railway Recruitment Control Board (RRCB)

Staff Selection Commission (SSC)

SSC Combined Graduate Level Examination (SSC CGLE)

Central Selection Board of Constable (CSBC)

Central Civil Services (Group B) (UPSC)


Thursday, August 26, 2021

Cannot call a javascript function from HTML file in codesandbox.io. ??!!!


I was a bit surprised to see that you cannot reference a javascript function using a Vanilla sandbox using codesandbox.io site. Upon googling a bit here is what I found:

 https://github.com/codesandbox/codesandbox-client/issues/1502 

Here is the working sandbox where we can call a javascript function from an HTML file.

https://codesandbox.io/s/sleepy-sunset-w0wds?file=/src/index.js

Here is the explanation provided by the codesandbox.io folks on it:

k, so the explanation is that in the vanilla template / parcel environment we're doing module bundling, handling src/index.js as a module. Because modules are evaluated in their own (private) scope, if you want to access from html something inside the module, you can put it on the browser's global scope, which is window.

Alternatively, you can use the static template / environment, where we don't do any bundling, like https://codesandbox.io/s/quirky-flower-rm20y (but then you lose the ability to require / import).


Friday, June 25, 2021

[MacOS BigSur 11.4] Issue with Pulse Secure client on Apple Silicon based macbook M1 laptop


 If you happen to buy or get your hands on the Apple Macbook Pro M1 or Macbook Air M1 based on the Apple M1 silicon chip there are a few things that might be helpful if you need to connect to your corporate VPN network using Pulse Secure application.

In my case, I did have my initial doubts if the pulse secure app will work successfully or not. My doubt turned out to be true and it did not work correctly out of the box.

If you download the Intel-based Pulse Secure version 9.1.9  application from Pulse secure website or from your company website, the application will not be able to successfully connect to your corporate network.

It will time out with a network error!! Googled out a bit & to my luck found this community post from Pulse Secure community website https://community.pulsesecure.net/t5/Pulse-Connect-Secure/PSAL-failed-to-Launch-Java-Applet-MacOS-Catalina-10-15-4/m-p/45177/highlight/true#M28690 

It turned out that you will need to install Oracle Java 25 from here https://javadl.oracle.com/webapps/download/AutoDL?BundleId=244576_d7fc238d0cbf4b0dac67be84580cfb4b and then restart Pulse Secure 9.1.9 and continue to connect to your corporate network connection URL & this time it should connect successfully once the SSO login with your corporate credentials works successfully. 



Friday, May 21, 2021

How to install touchpad driver for HP laptops to enable finger swipe gestures and bitlocker recovery

If your HP laptop has a precision touchpad functionality but the finger swipe gestures such as 2 finger scroll up down or th 3 finger app switching are not working, follow the below steps:

1. Visit the below HP official website and select the appropriate laptop model

https://support.hp.com/in-en/drivers/selfservice/hp-elitebook-840-g5-notebook-pc/8491271 






2. Navigate to the above driver selection at Driver-Keyboard, Mouse and Input Devices & hit the download button for the Synaptics Touch fingerprint driver. Install the driver and restart your laptop.

3. In case your Windows Operating system disk drives are bitlocker encrypted, you will reach the bitlocker recovery screen since the driver configuration of your system has changed. DO NOT PANIC !! Visit the custom URL seen on your laptop screen to access the recovery key for your laptop in the Microsoft site custom URL. Enter the recovery key and you should be able to successfully log in to your Windows desktop console.


Notice that the finger swipe gestures are now functional.

4. Configure the Precision Touchpad as per your preference here:



More details about bitlocker recovery  

https://docs.microsoft.com/en-us/windows/security/information-protection/bitlocker/bitlocker-recovery-guide-plan 

Monday, May 17, 2021

Some useful terminologies related to rendering on the web

 Rendering

  • SSR: Server-Side Rendering - rendering a client-side or universal app to HTML on the server.
  • CSR: Client-Side Rendering - rendering an app in a browser, generally using the DOM.
  • Rehydration: “booting up” JavaScript views on the client such that they reuse the server-rendered HTML’s DOM tree and data.
  • Prerendering: running a client-side application at build time to capture its initial state as static HTML.

Performance

  • TTFB: Time to First Byte - seen as the time between clicking a link and the first bit of content coming in.
  • FP: First Paint - the first time any pixel gets becomes visible to the user.
  • FCP: First Contentful Paint - the time when requested content (article body, etc) becomes visible.
  • TTI: Time To Interactive - the time at which a page becomes interactive (events wired up, etc).

Reference: developers.google.com

Tuesday, May 4, 2021

How to change the default pdf viewer application in your Mac or MacBook

 To set a PDF viewer as the default on Mac OS X:

  1. Select any PDF file from Finder. Control-click to open the menu. ... 
  2. Choose Get Info from the menu that opens. ... 
  3. From the Open with: section in the new window that opens, select your preferred application, such as Adobe Reader or Preview. ... 
  4. Click the Change All button.

Popular Posts