Skip to content

Instantly share code, notes, and snippets.

View ravibhure's full-sized avatar

Ravi ravibhure

View GitHub Profile

How To Configure PostgreSQL 12 Streaming Replication in Ubuntu 18.04

  • Build two boxes and install ubuntu18.04

    • box1: master -> Ubuntu 18.04 with PG 12
      • static ip: 192.168.33.33
      • hostname: master
    • box2: slave -> Ubuntu 18.04 with PG 12
      • static ip: 192.168.33.44
      • hostname: slave
@ravibhure
ravibhure / CUDA_Toolkit_10.0_installation_on_CentOS_7.sh
Created December 16, 2021 13:15 — forked from Mahedi-61/CUDA_Toolkit_10.0_installation_on_CentOS_7.sh
Step by step instructions for installing CUDA Toolkit 10.0 CentOS 7 Server machine for running Deep Learning projects
#!/bin/bash
## This gist contains step by step instructions to install cuda v10.1 and cudnn 7.6 in CentOS 7
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
@ravibhure
ravibhure / cuda_11.2_installation_on_Ubuntu_20.04
Created December 16, 2021 13:15 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
CUDA 11.2 Installation on Ubuntu 20.04
#!/bin/bash
## This gist contains instructions about cuda v11.2 and cudnn8.1 installation in Ubuntu 20.04 for Pytorch 1.8 & Tensorflow 2.7.0
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
@ravibhure
ravibhure / git_squash_commits.md
Last active September 1, 2020 10:49
How to squash commits

To squash commits, you can do the following:

Make sure your branch is up to date with the master branch.

Run git rebase -i master.

You should see a list of commits, each commit starting with the word "pick".

Make sure the first commit says "pick" and change the rest from "pick" to "squash". -- This will squash each commit into the previous commit, which will continue until every commit is squashed into the first commit.

@ravibhure
ravibhure / service-errors.md
Created July 1, 2020 09:20
service troubles
$ sudo journalctl --no-pager -b -u docker.service
Jul 01 11:09:43 ravi-ThinkPad-X240 dockerd[28098]: unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives are specified both as a flag and in the configuration file: hosts: (from flag: [fd://], from file: [unix:///var/run/docker.sock])
Jul 01 11:09:43 ravi-ThinkPad-X240 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Jul 01 11:09:43 ravi-ThinkPad-X240 systemd[1]: Failed to start Docker Application Container Engine.
Jul 01 11:09:43 ravi-ThinkPad-X240 systemd[1]: docker.service: Unit entered failed state.
Jul 01 11:09:43 ravi-ThinkPad-X240 systemd[1]: docker.service: Failed with result 'exit-code'.
Jul 01 11:09:45 ravi-ThinkPad-X240 systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Jul 01 11:09:45 ravi-ThinkPad-X240 systemd[1]: Stopped Docker Application Container Engine.
Jul 01 11:09:45 ravi-ThinkPad-X240 systemd[1]: docker.service: Start request repeated too
@ravibhure
ravibhure / AUTO_REGISTER_NAGIOS.md
Created June 27, 2020 06:30
How to use Nagios to monitor services running under AWS auto scaling group (ASG)

How to use Nagios to monitor services running under AWS auto scaling group (ASG)

What is expected from reader

The reader is expected to have basic knowledge about below technologies/concepts.

  • Nagios Core
  • AWS Auto Scaling Group (ASG)
  • PHP REST API
  • DevOps
@ravibhure
ravibhure / Jenkinsfile
Created June 18, 2020 14:42 — forked from richid/Jenkinsfile
Jenksfile declarative pipeline with parallel dynamic stages
def applications = env.APPLICATIONS.split(",").findAll { it }.collect { it.trim() }
def environment = env.ENVIRONMENT
def version = env.VERSION
def jobs = [:]
if (applications.size() < 1) {
error("ERROR: APPLICATIONS must be a comma-delimited list of applications to build")
}
for (int i = 0; i < applications.size(); i++) {

Keybase proof

I hereby claim:

  • I am ravibhure on github.
  • I am ravibhure (https://keybase.io/ravibhure) on keybase.
  • I have a public key ASCE8Vdzk4uezYOmUnvJJQwTjJfbQqvOYl6Eze2GFI4hZAo

To claim this, I am signing this object:

@ravibhure
ravibhure / coronavirus.py
Created March 13, 2020 11:01
A python program to check the risk of the corona virus
#!/usr/bin/python3
# A python program to check the risk of the corona virus.
# This is not written by me, but found somewhere on social media
# Thanks to UNKNOWN coder :)
name = input('name: ')
age = int(input('age: '))
print('\ndo you have any of these symptomps?')
fever = int(input('fever (0= no, 1= yes): '))
cough = int(input('cough (0= no, 1= yes): '))
sob = int(input('shortness of breath (0= no, 1= yes): '))
@ravibhure
ravibhure / whois.conf
Created November 27, 2019 06:44 — forked from thde/whois.conf
/etc/whois.conf WHOIS records for nTLDs.
##
# WHOIS servers for new TLDs (http://www.iana.org/domains/root/db)
# Current as of 2017-12-10 UTC
##
\.aarp$ whois.nic.aarp
\.abarth$ whois.afilias-srs.net
\.abbott$ whois.afilias-srs.net
\.abbvie$ whois.afilias-srs.net
\.abc$ whois.nic.abc