Skip to content

Instantly share code, notes, and snippets.

View ravibhure's full-sized avatar

Ravi ravibhure

View GitHub Profile
@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
"""
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 / Query-Registry.ps1
Created January 24, 2017 04:00 — forked from so0k/Query-Registry.ps1
Query a docker registry v2/_catalog endpoint from powershell
[CmdletBinding()]
Param(
[Parameter(Mandatory=$True,Position=1)]
$Filter=".*",
#TODO: handle https & no basic auth as well..
$RegistryEndpoint = "registry.mysite.com",
$UserName = "user",
$Password = "password"
)
@ravibhure
ravibhure / headless.md
Created December 29, 2016 13:01 — forked from addyosmani/headless.md
So, you want to run Chrome headless.
@ravibhure
ravibhure / openconnect-7-ubuntu-build.md
Created August 5, 2016 05:45 — forked from darrenpmeyer/openconnect-7-ubuntu-build.md
Building OpenConnect 7 on Ubuntu 14 (trusty) and 15 (vivid)

Building OpenConnect 7 on Ubuntu 14 (trusty) and 15 (vivid)

The steps in this guide are available as an autobuild shell script

Why?

Because the OpenConnect package from Ubuntu is a bit outdated, and if you have a recent AnyConnect server, you need a newer OpenConnect to play with it.

Why this guide uses OpenSSL instead of GnuTLS

@ravibhure
ravibhure / base.rb
Created January 12, 2016 10:55 — forked from jtimberman/base.rb
an example roles/base.rb
name "base"
description "Baseline configuration for all systems."
run_list(
"recipe[ohai]",
"recipe[chef-client::delete_validation]",
"recipe[chef-client]",
"recipe[zsh]",
"recipe[git]",
"recipe[users]",
@ravibhure
ravibhure / README.md
Created April 29, 2016 12:15 — forked from trinitronx/README.md
A shell script to install latest Ansible via pip + dependencies

omnibus-ansible

Install latest Ansible via pip + dependencies via a shell script

This file is used to install ansible in test kitchen when you set in the kitchen.yaml file

require_ansible_omnibus: true

By default test kitchen will always download and use the latest version of this install file.

WARNING: AS SOON AS YOU MERGE CODE HERE IT IS INSTANTLY AVAILABLE TO EVERYONE DOING OMNIBUS KITCHEN ANSIBLE INSTALLS:

@ravibhure
ravibhure / Ansible-Vault how-to.md
Created March 21, 2016 13:45 — forked from tristanfisher/Ansible-Vault how-to.md
A short tutorial on how to use Vault in your Ansible workflow. Ansible-vault allows you to more safely store sensitive information in a source code repository or on disk.

##Working with ansible-vault

I've been using a lot of Ansible lately and while almost everything has been great, finding a clean way to implement ansible-vault wasn't immediately apparent.

What I decided on was the following: put your secret information into a vars file, reference that vars file from your task, and encrypt the whole vars file using ansible-vault encrypt.

Let's use an example: You're writing an Ansible role and want to encrypt the spoiler for the movie Aliens.

---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.