Skip to content

Instantly share code, notes, and snippets.

View ravibhure's full-sized avatar

Ravi ravibhure

View GitHub Profile
@ravibhure
ravibhure / installing-rabbitmq-centos6.3-minimal.md
Created November 4, 2014 15:55
Installing RabbitMQ on CentOS 6

Installing RabbitMQ on CentOS 6.3 Minimal

This tutorial will demonstrate how to install RabbitMQ 3.x on CentOS 6.3 ("minimal" profile).

This install was performed using VMWare Fusion on OSX, but should demonstrate the process on most environments using Linux-supported drivers. The virtual was 1-core, 1.6GB RAM, 6GB HDD space; I did not use the quick setup VMWare offers.

There are two ways of installing RabbitMQ on CentOS. The ways differ based on which distribution of Erlang you chose to use (the one out of EPEL or a later version from Erlang Solutions). We will demonstrate both ways in this example.

One of the goals of this tutorial is to not install anymore software than needed. We will use "vi" instead of "pico" or "nano" because that's what's bundled with CentOS minimal profile. If you would rather use another text editor, please install it on your own.

Settting up a Container Registry with docker-gitlab

This should be used for new users to getting started with the container registry feature on docker-gitlab.

Requirements

@ravibhure
ravibhure / jenkins-home-git.sh
Created March 22, 2018 13:47 — forked from cenkalti/jenkins-home-git.sh
Backup Jenkins home periodicallly with git.
#!/bin/bash
# Setup
#
# - Create a new Jenkins Job
# - Mark "None" for Source Control Management
# - Select the "Build Periodically" build trigger
# - configure to run as frequently as you like
# - Add a new "Execute Shell" build step
# - Paste the contents of this file as the command
@ravibhure
ravibhure / get_ansible.sh
Last active January 9, 2018 03:28
Install ansible another way
#!/bin/bash
# ANSIBLE_VERSION if not provided, script will install default ansible version which is 2.3.1
ANSIBLE_VERSION=$1
_pip_deps(){
pip --quiet install -U setuptools > /dev/null 2>&1
pip --quiet install -U pip > /dev/null 2>&1
}
# just to sleep
sleep 20 ;
@ravibhure
ravibhure / Apache Reverse Proxy
Last active January 5, 2018 06:21
Reverse Proxy - Apache & Nginx
# Make sure mod_ssl, mod_rewrite, mod_headers, mod_proxy,
# mod_proxy_http and mod_proxy_balancer are enabled
# Advanced Apache reverse proxy - Rails
# Oh so cleverly adapted from this https://gist.github.com/MrZYX/719014
<VirtualHost *:80>
ServerName www.example11.com
RedirectPermanent / https://www.example11.com/
</VirtualHost>
<VirtualHost *:443>
@ravibhure
ravibhure / kitchen.yml
Created November 3, 2017 21:10
kitchen for windows
---
# https://discourse.chef.io/t/how-to-run-test-kitchen-on-an-existing-windows-server/11871/1
driver:
name: proxy
host: <fqdn>
reset_command: "exit 0"
port: 5985
username: <user>
password: <password>
@ravibhure
ravibhure / extract_ff_password.md
Created October 30, 2017 07:36
List all passwords from Firefox database
  1. copy your mozilla firefox profile from %APPDATA%\Mozilla\Firefox\Profiles\*.default on Windows machine to any ubuntu

$ scp -P 2223 -r *.default ravi@127.0.0.1:/tmp/

  1. Follow the steps below to extract the password for users and sitename
$ cd /tmp/*.default
$ sudo apt-get -y install sqlite nss-passwords
@ravibhure
ravibhure / AWS.js
Created October 13, 2017 09:38 — forked from zircote/AWS.js
Google Script for Excel and AWS instance pricing + Reserved Instances
/**=
* User: zircote
* Date: 16/10/2013
* Time: 08:59
*/
var SERVICE_HOST = 'http://aws.amazon.com'
var data_sources = {
"linux-od": {
@ravibhure
ravibhure / update-alternatives-golang.sh
Created September 25, 2017 13:05 — forked from bench/update-alternatives-golang.sh
update-alternatives golang
#!/bin/bash
#
# Use the following script using sudo to install multiple golang installations on your debian
# update-alternatives creates, removes, maintains and displays information about the symbolic links comprising the alternatives system
# Usage : sudo ./full_golang_install.sh
#
if [[ $(id -u) -ne 0 ]] ; then echo "This script should be run using sudo or as the root user" ; exit 1 ; fi
## Configuration and init
@ravibhure
ravibhure / GoVersionManager.md
Last active September 25, 2017 13:04
Easy install and update

Add basic packages

sudo apt-get install curl git mercurial make binutils bison gcc build-essential

Install GVM

bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)

Install which version you want to install

gvm install go1.9

Use it as default version