Skip to content

Instantly share code, notes, and snippets.

@mohanpedala
mohanpedala / inside_nginx.md
Last active March 28, 2023 12:39
Inside Nginx

Virtual Host and Serving Static Content

  • Default path: vim /etc/nginx/conf.d/default.conf

  • Custom Config vim /etc/nginx/conf.d/example.com.conf

  • Default index.html: /usr/share/nginx/html/index.html

  • Custom index.html: /var/www/example.com/html/index.html

    • Path explanation:
      • Default path : /var/www/
  • Virtualhostname : example.com
@mohanpedala
mohanpedala / chef-workstation-configuration.md
Last active March 14, 2023 22:34
chef-workstation-configuration

Chef-workstation-configuration

Once the chef-workstation installation(here is the link to run the script to install chef-workstation on RHEL 7) is completed we need to verify the main components in the chef-dk

chef verify

To configure the environment variable use chef env

chef env
@mohanpedala
mohanpedala / nginx_improving_ssl_configuration.md
Created March 26, 2019 18:05
nginx improving SSL Configuration

Improving SSL Configuration

  • Documentation:
    • NGINX ssl module
    • Mozilla’s Server Side TLS Documentation
  • Add session caching so that fewer SSL handshakes need to be made.
  • The initial handshake is the most taxing part of the process, and if we can avoid repeating it then we’ll improve our overall performance.
    $ vim /etc/nginx/conf.d/default.conf
    

ssl_certificate /etc/nginx/ssl/public.pem;

@mohanpedala
mohanpedala / helm-install.md
Last active January 18, 2023 21:25
helm 2 and helm 3 installation on a linux machine

Helm 3 installation

  • Download the package and untar it.
wget https://get.helm.sh/helm-v3.0.2-linux-amd64.tar.gz

tar xvf helm-v3.0.2-linux-amd64.tar.gz
  • Move the package to the below location
mv linux-amd64/helm /usr/local/bin/helm3
@mohanpedala
mohanpedala / force_delete_user_in_mac.md
Last active March 9, 2022 09:14
Force Delete user in mac

Can’t Delete Original Admin User on macOS High Sierra

I recently migrated to a new MacBook Pro. The old one was on High Sierra, but the new one wasn’t. So I created a temp “admin” account to do the upgrade, then do the migration with Migration Assistant.

All seemed okay, but when I went to delete the original user account, I couldn’t. And I don’t mean “you don’t know how to delete accounts” couldn’t. I mean, I tried every possible way, and it wouldn’t couldn’t.

I found this thread on the Apple forums with people having the same problem. After trying everything else, this is the solution shared in one of the replies that worked. Warning, I have no idea of the side effects this might have, but so far so good for me. Also, do not come crying to me if it totally hoses your machine. You’ve been warned!

@mohanpedala
mohanpedala / Maven_windows_installation.md
Last active December 6, 2021 20:25
Maven windows installation

Maven Installation

Prerequisites:
  • jdk 1.8 or 1.7

To verify jdk on your machine

  • Open command prompt and enter java -version
  • you can also check JAVA_HOME path in environment variables
JAVA_HOME C:\Program Files\Java\jdk1.8.x.x_xx
@mohanpedala
mohanpedala / nginx_logs.md
Created March 26, 2019 18:08
nginx configuring logs

Configuring Logging

  • Documentation For This Video
  • Configure access logs. Two main types are
    • Access logs
    • Error logs
  • According to the above steps we have configured access logs as below.
@mohanpedala
mohanpedala / ReleaseViaJGitFlow.md
Created September 7, 2019 19:44 — forked from lemiorhan/ReleaseViaJGitFlow.md
How to make a release with Git and Maven via JGitFlow

How to make a release with Git and Maven via JGitFlow

Imagine that you are versioning your sourcecode in git and building your code via maven. You need to make releases before deploying to production regularly. What should be the strategy we need to follow for releasing?

I've used maven-release-plugin for years to make releases. It worked perfectly with maven and svn, but we started to face problems when we migrated our code to git and to make releases on git.

After checking the literature, we decided to use JGit-Flow which is a maven plugin based on and is a replacement for the maven-release-plugin enabling support for git-flow style releases via maven.

I do not want to explain the details much because there are many great posts explaining all.

@mohanpedala
mohanpedala / df_du.md
Last active January 2, 2020 20:56
disk filesystem (df) & disk usage(du)

du == Disk Usage. It walks through directory tree and counts the sum size of all files therein. It may not output exact information due to the possibility of unreadable files, hardlinks in directory tree, etc. It will show information about the specific directory requested. Think, "How much disk space is being used by these files?"

df == Disk Free. Looks at disk used blocks directly in filesystem metadata. Because of this it returns much faster that du but can only show info about the entire disk/partition. Think, "How much free disk space do I have?"

Disk filesystem

Check Disk space usage