Posts

Showing posts from July, 2021

Arch Linux: Windows OS not apearing in Grub boot loader.

As I have installed Endeavour Linux operating system, on first boot I could see Windows OS option in boot menu. Later its gone. After searching a while, I came across below solution which worked. Main reason is the os-prober is disabled by default so it wont be able to detect other OS available in the same system. So first we have to enable it. Open file `/etc/default/grub` and add `GRUB_DISABLE_OS_PROBER=false` to the very end of the file. If you have already have this property, set it to `true`. You can also execute below command, make sure you are in root shell or sudo user to execute this command. echo "GRUB_DISABLE_OS_PROBER=false" >> /etc/default/grub Then, execute below commands sudo pacman -Syu sudo pacman -S grub-tools sudo pacman -S grub os-prober sudo grub-mkconfig -o /boot/grub/grub.cfg Actually if you `os-prober` command you can see the output that Windows detected right away [agastya@agastya-thinkpad ~]$ sudo os-prober /dev/nvme

Arch Linux - Frequent or Random Freezes

I have bought a new Leveno Thinkpad AMD Series laptop and installed EndeavourOS in it. Endeavour is a Arch flavour and Arch is known for stability. Usually I am CentOS fan but as Corporate made its choice with CentOS future, I did research thoughting of sticking with one of my favorite Arch Linux. But Arch, you have to setup everything and its an interesting process though time taking. So I have chosen its flavour which comes with everything setup from GUI to Stack OS One problem kept me frustrated that its freezes randomly and started connecting Ethernet adapter suddenly and that hangs the entire OS and sometimes I have experienced restarts as well. On searching around Arch Linux forums I came across installed a LTS kernel solving the issue. If you are also facing the issue you can solve it by installing LTS kernel with below commands sudo pacman -S linux-lts linux-lts-headers sudo grub-mkconfig -o /boot/grub/grub.cfg And reboot your machine. While Booting make sure you

How to start sonarqube using dockers ?

SonarQube is an open-source platform developed by SonarSource for continuous inspection of code quality to perform automatic reviews with static analysis of code to detect bugs, code smells, and security vulnerabilities on 20+ programming languages. SonarQube offers reports on duplicated code, coding standards, unit tests, code coverage, code complexity, comments, bugs, and security vulnerabilities. If you have Docker installed, then its very easy to have a SonarQube instance running your machine below instructions. docker pull sonarqube docker run -d --name sonarqube_container -p 9000:9000 sonarqube In your browser access http://localhost:9000 And login with default credentials as below username = admin password = admin Hope it helps. Thank you.

Javascript: Custom exceptions

In Javascript custom exception can be created and make them caught by `catch`. For example lets see below code let json = '{ "age": 30 }'; // incomplete data try { let user = JSON.parse(json); if (!user.name) { throw new Error("Incomplete data: no name"); } alert( user.name ); } catch (err) { alert( "JSON Error: " + err.message ); // JSON Error: Incomplete data: no name } Hope it helps. Thank you.

Computer Security Series - Part 2 - Basic Terminology

                                             Security Series Part 2 Part-1 Weakness : A Quality or feature that prevents something from being secure. A weakness encourages Attackers to use the specific app which has weakness as Attack surface. Vulnerability : A weakness in a system, application or network that is subject to exploitation or misuse. Exploit : A program that allows attackers to automatically break into a system. Attack : An attempt to gain unauthorized access. Mitigation : Steps taken to eliminate or diminish a threat or risk. Exposure : A period of time during which a vulnerability can possibly be exploited. Security Framework     - Identify : Identify the risks or gaps in your environment and the people, process and tools you need.     - Protect : protect your environment. You need to tune and see areas to protect continuously,     - Detection : Detection is vital, check for alarms and alerts, the quicker you detect a potential exploit or a potential bad actor entering

Computer Security Series - Part 1 - Basic Terminology

  Security Series Part 1 Hello Everyone, I am starting a security series. At this moment I don't have much information where we would be landing. Lets just get started!!! In this post I am coming up with security terminology and their definition, this is complete theory so you can also read in your mobile. Secure environment is a combination of people, process and tools ( 3 tiers of security). All these 3 entities must work together and play vital role to have a secure environment. Process : Have standards to apply security at everything we do. Tools : find and fix problems to have the most secure offering at the end of the day Attacker : An Adversary seeking to exploit potential vulnerabilities of a system. Application Security : Measures taken to improve the security of a an application by finding, fixing and preventing security problems. Software security : Engineering software so that it continues to function correctly under malicious attack. Threat : Possible danger that might

Vagrantfile: In a more ruby way to customize RAM and CPU core.

Hello Everyone,     Here is my new Vagrantfile which coded in more ruby way. This code helps you with customize RAM, CPU and OS based provision script. Most of the code is self explanatory if you have basic understanding of Vagrant. # -*- mode: ruby -*- # vi: set ft=ruby : # All Vagrant configuration is done below. The "2" in Vagrant.configure # configures the configuration version (we support older styles for # backwards compatibility). Please don't change it unless you know what # you're doing. $hostnames = <<-script echo="" master.mypuppetsetup.com="" puppet="" puppetmaster="">> /etc/hosts echo "192.168.66.20 k8sworker1 k8sworker1.mypuppetsetup.com" >> /etc/hosts echo "192.168.66.30 k8sworker2 k8sworker2.mypuppetsetup.com" >> /etc/hosts SCRIPT $centos_setup = <<-script -y="" :hostname="" apt-get="" epel-release="" install="&q