Skip to content

Instantly share code, notes, and snippets.

Abhi Yerra abhiyerra

Block or report user

Report or block abhiyerra

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View papersite.rb
# TODO:
# - [ ] Embedly
# -
require "httparty"
require "aws-sdk-s3"
SITES = [
{
paper: "https://paper.dropbox.com/doc/...",
View gitoutline-issue.rb
#!/usr/bin/env ruby
require "commonmarker"
require "octokit"
repo = ARGV[0]
doc = CommonMarker.render_doc(open(ARGV[1]).read)
outline = Hash.new { "" }
@abhiyerra
abhiyerra / parkingspot-terraform-spot-fleet.tf
Created Sep 26, 2016
parkingspot-terraform-spot-fleet
View parkingspot-terraform-spot-fleet.tf
resource "aws_spot_fleet_request" "cheap_compute" {
iam_fleet_role = "arn:aws:iam::12345678:role/spot-fleet"
spot_price = "0.03"
allocation_strategy = "diversified"
target_capacity = 6
valid_until = "2019-11-04T20:44:20Z"
launch_specification {
instance_type = "m4.10xlarge"
ami = "ami-1234"
spot_price = "2.793"
View org_converter.rb
module Jekyll
# Convert org-mode files.
require 'org-ruby'
class OrgConverter < Converter
safe true
def setup
# No-op
end
@abhiyerra
abhiyerra / gmail.tf
Created Dec 2, 2016
Cloudflare + Gmail MX Records
View gmail.tf
provider "cloudflare" {
email = ""
token = ""
}
resource "cloudflare_record" "cf_mx0" {
domain = "opszero.com"
name = "@"
value = "aspmx.l.google.com"
priority = "1"
View keybase.md

Keybase proof

I hereby claim:

  • I am abhiyerra on github.
  • I am abhiyerra (https://keybase.io/abhiyerra) on keybase.
  • I have a public key ASBAR0ByOSJbUFV6BpKQGJPfbw8mRWfpeie-u34jjMihhAo

To claim this, I am signing this object:

View seespot.sh
seespot -health-port=8686 -health-path=/health -app-health=”https://localhost:8080/health" -cleanup-task=/path/to/cleanup.sh
@abhiyerra
abhiyerra / parkingspot-docker-machine.sh
Last active Oct 5, 2016
docker-machine and docker-compose
View parkingspot-docker-machine.sh
PARKINGSPOT_API_KEY=yourapikey
$(parkingspot -memory 2000 -cpu 6 -max-bid 0.50) docker-machine create --driver amazonec2 \
--amazonec2-request-spot-instance \
--amazonec2-region "${PARKINGSPOT_REGION}" \
--amazonec2-spot-price "${PARKINGSPOT_BID}" \
--amazonec2-instance-type "${PARKINGSPOT_INSTANCE_TYPE}" \
parkingspot-worker
# If you want to use Docker Compose
@abhiyerra
abhiyerra / parkingspot-terraform-spot-instance.tf
Last active Sep 28, 2016
parkingspot-terraform-spot-instance
View parkingspot-terraform-spot-instance.tf
variable "spot_price" {
type = "string"
}
variable "instance_type" {
type = "string"
}
variable "region" {
type = "string"
@abhiyerra
abhiyerra / parkingspot.sh
Last active Sep 27, 2016
parkingspot-curl
View parkingspot.sh
curl -i \
-H "Content-Type: application/json"
-H 'X-PARKINGSPOT-API-KEY: yourkey' \
-X POST
-d '{"MaxBid": 0.25, "Region": "us-west-2"}'
https://api.parkingspot.bid/v1/spot/me
# You can also just use our CLI tool:
# https://github.com/acksin/parkingspot
You can’t perform that action at this time.