Skip to content

Instantly share code, notes, and snippets.

@ravibhure
ravibhure / kitchen.yml
Created Nov 3, 2017
kitchen for windows
View kitchen.yml
---
# 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 Oct 30, 2017
List all passwords from Firefox database
View extract_ff_password.md
  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 Oct 13, 2017 — forked from zircote/AWS.js
Google Script for Excel and AWS instance pricing + Reserved Instances
View AWS.js
/**=
* 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 Jan 9, 2018
Install ansible another way
View get_ansible.sh
#!/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 ;
View update-alternatives-golang.sh
#!/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 Sep 25, 2017
Easy install and update
View GoVersionManager.md

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

View lambda_echobot.py
"""
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"]
@ravibhure
ravibhure / AWS-CSA-A-Notes.md
Created Aug 29, 2017 — forked from jacoelho/AWS-CSA-A-Notes.md
Notes from studying for the AWS Certified Solutions Architect Exam. I felt well-prepared for the exam and passed with a 94%. Please reach out with any corrections or questions.
View AWS-CSA-A-Notes.md

External Resources

View GitlabContainerRegistrySetup.md

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 / AWS VPC Flow Logs Collection (Lambda)
Created Jun 19, 2017
AWS VPC Flow Logs Collection (Lambda)
View AWS VPC Flow Logs Collection (Lambda)
# Terraform template to have VPC flow logs be sent to AWS Lambda
provider "aws" {
region = "us-west-2"
}
resource "aws_cloudwatch_log_group" "vpc_flow_log_group" {
name = "vpc-flow-log-group"
retention_in_days = 1
}