Skip to content

Instantly share code, notes, and snippets.

View ravibhure's full-sized avatar

Ravi ravibhure

View GitHub Profile
@ravibhure
ravibhure / coronavirus.py
Created March 13, 2020 11:01
A python program to check the risk of the corona virus
#!/usr/bin/python3
# A python program to check the risk of the corona virus.
# This is not written by me, but found somewhere on social media
# Thanks to UNKNOWN coder :)
name = input('name: ')
age = int(input('age: '))
print('\ndo you have any of these symptomps?')
fever = int(input('fever (0= no, 1= yes): '))
cough = int(input('cough (0= no, 1= yes): '))
sob = int(input('shortness of breath (0= no, 1= yes): '))
@ravibhure
ravibhure / whois.conf
Created November 27, 2019 06:44 — forked from thde/whois.conf
/etc/whois.conf WHOIS records for nTLDs.
##
# 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 / gist:7523642
Created November 18, 2013 06:47
HAProxy config for wordpress
# HAProxy config to block /wp-login.php and wp-admin POST method on wordpress webserver
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 25000
#debug
#quiet
user prod
group prod
@ravibhure
ravibhure / AWS-CSA-A-Notes.md
Created August 29, 2017 08:23 — 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.

External Resources

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

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 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.

---
c1_packages:
- c1-templates-bundle
- c1-cre-api
@ravibhure
ravibhure / docker_centos
Last active December 7, 2018 17:57
Docker for CentOS
# Disable selinux as it interferes with functionality of LXC
$ setenforce 0
$ echo 'SELINUX=disabled' > /etc/selinux/config
# Download and setup Fedora EPEL Repository
$ yum -y install http://ftp.riken.jp/Linux/fedora/epel/6/i386/epel-release-6-8.noarch.rpm
# Setup hop5.in repository
$ wget http://www.hop5.in/yum/el6/hop5.repo -O /etc/yum.repos.d/hop5.repo
@ravibhure
ravibhure / Git_Cheatsheet.md
Created September 2, 2014 16:15
Git Cheatsheet
@ravibhure
ravibhure / AWS VPC Flow Logs Collection (Lambda)
Created June 19, 2017 10:36
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
}