Skip to content

Instantly share code, notes, and snippets.

View ravibhure's full-sized avatar

Ravi ravibhure

View GitHub Profile
@ravibhure
ravibhure / git_rebase.md
Last active April 3, 2024 08:38
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

## How to install on Ubuntu (also works on Ubuntu for Windows)
https://github.com/magnumripper/JohnTheRipper
https://github.com/magnumripper/JohnTheRipper/blob/bleeding-jumbo/doc/EXAMPLES
https://dunnesec.com/category/tools/john-the-ripper/decrypting-linuxunix-password-shadow-files-using/
## From apt packages
### install
sudo apt-get update

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 / 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 / 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 / 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: