Nmap useful commands

  • Written on 2020-12-18 05:29:00
  • Last updated2020-12-18 05:29:00

how to resolve npm permission issue ?

  • Written on 2020-11-02 05:29:00
  • Last updated2020-11-02 05:29:00

This is general solutions for all kind of npm permission issue.

sudo chown -R $USER ~/.npm
sudo chown -R  $USER /usr/bin/npm
sudo chown -R  $USER /usr/lib/node_modules/
chmod -R a+x node_modules

Expected response code 250 but got code “535”, with message "535-5.7.8 Username and Password not accepted

  • Written on 2020-06-20 07:14:08
  • Last updated2020-06-20 07:14:08

I researched on the internet and some answers includes enabling the "access for lesser app" and "unlocking gmail captcha" which sadly didn't work for me until I found the 2-step verification.

how to get all twig variables from template

  • Written on 2020-03-12 05:29:00
  • Last updated2020-03-12 05:29:00

This is how I use to debug any twig template and it's variables. Just include into your twig template and pass variable = object | array | null

{% partial 'debug' variable=post %}

how to replace content in large file?

  • Written on 2020-03-02 05:29:00
  • Last updated2020-03-02 05:29:00

Many time developer just need to replace a bit of text inside the large file like *.sql or *.sqlite
Opening a file into editor take too much resource of system or server. So I come up with the very easy and useful way to replace content into large file using linux command like. sed command.

Here I am taking an example of MySql file which having *.sql as file extension

sed -i '' 's/utf8mb4_0900_ai_ci/utf8mb4_unicode_ci/g'

Programming Principles

  • Written on 2020-02-29 05:29:00
  • Last updated2020-02-29 05:29:00

While I have started my journey to the Programming world, I come accross many principles which I am list down here for easy understanding.

How to sign your work using git commit?

  • Written on 2020-01-26 05:29:00
  • Last updated2020-01-26 05:29:00

Nested Set pattern for Laravel’s Eloquent ORM.

  • Written on 2019-12-08 22:03:48
  • Last updated2019-12-08 22:05:03

For Nested Set pattern , I would suggest to follow this links

The theory behind, a TL;DR version

An easy way to visualize how a nested set works is to think of a parent entity surrounding all of its children, and its parent surrounding it, etc. So this tree:

Happy work life rules

  • Written on 2017-12-24 04:57:27
  • Last updated2017-12-24 04:57:27

I have read some where these following rules to become more happier with work life.

SSL Certificate in detail

  • Written on 2017-12-23 04:57:27
  • Last updated2017-12-23 04:57:27

What is SSL (Secure Socket Layer) ? SSL is also known as Transport Layer Security.

PEM Format

The PEM format is the most common format that Certificate Authorities issue certificates in. PEM certificates usually have extentions such as .pem, .crt, .cer, and .key. They are Base64 encoded ASCII files and contain "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" statements. Server certificates, intermediate certificates, and private keys can all be put into the PEM format.

PKCS#7/P7B Format

The PKCS#7 or P7B format is usually stored in Base64 ASCII format and has a file extention of .p7b or .p7c. P7B certificates contain "-----BEGIN PKCS7-----" and "-----END PKCS7-----" statements. A P7B file only contains certificates and chain certificates, not the private key. Several platforms support P7B files including Microsoft Windows and Java Tomcat.