Skip to content

Instantly share code, notes, and snippets.

View ravibhure's full-sized avatar

Ravi ravibhure

View GitHub Profile
---
c1_packages:
- c1-templates-bundle
- c1-cre-api
@ravibhure
ravibhure / ca.md
Created August 9, 2018 12:17 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.

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

"""
Slack chat-bot Lambda handler.
"""
import os
import logging
import urllib
# Grab the Bot OAuth token from the environment.
BOT_TOKEN = os.environ["BOT_TOKEN"]