Skip to content

Instantly share code, notes, and snippets.

@ravibhure
ravibhure / Jenkinsfile
Created Jun 18, 2020 — forked from richid/Jenkinsfile
Jenksfile declarative pipeline with parallel dynamic stages
View Jenkinsfile
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++) {
@ravibhure
ravibhure / whois.conf
Created Nov 27, 2019 — forked from thde/whois.conf
/etc/whois.conf WHOIS records for nTLDs.
View whois.conf
##
# WHOIS servers for new TLDs (http://www.iana.org/domains/root/db)
# Current as of 2017-12-10 UTC
##
\.aarp$ whois.nic.aarp
\.abarth$ whois.afilias-srs.net
\.abbott$ whois.afilias-srs.net
\.abbvie$ whois.afilias-srs.net
\.abc$ whois.nic.abc
@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

@ravibhure
ravibhure / redis_and_resque.mkd
Created Nov 25, 2016 — forked from Diasporism/redis_and_resque.mkd
How to configure Redis and Resque for your Rails app.
View redis_and_resque.mkd

Redis and Resque

What this guide will cover: the code you will need in order to include Redis and Resque in your Rails app, and the process of creating a background job with Resque.

What this guide will not cover: installing Ruby, Rails, or Redis.

Note: As of this writing I am still using Ruby 1.9.3p374, Rails 3.2.13, Redis 2.6.11, and Resque 1.24.1. I use SQLite in development and Postgres in production.

Background jobs are frustrating if you've never dealt with them before. Over the past few weeks I've had to incorporate Redis and Resque into my projects in various ways and every bit of progress I made was very painful. There are many 'gotchas' when it comes to background workers, and documentation tends to be outdated or scattered at best.

@ravibhure
ravibhure / ca.md
Created Aug 9, 2018 — forked from soarez/ca.md
How to setup your own CA with OpenSSL
View ca.md

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.

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 / jenkins-home-git.sh
Created Mar 22, 2018 — forked from cenkalti/jenkins-home-git.sh
Backup Jenkins home periodicallly with git.
View jenkins-home-git.sh
#!/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 / 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": {
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
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"]