Skip to content

Instantly share code, notes, and snippets.

@saurabh-hirani
saurabh-hirani / ignore-errors-test-output.md
Last active Jun 19, 2020
ignore-errors-test-output.md
We couldn’t find that file to show.
@saurabh-hirani
saurabh-hirani / cloud-nuke-ignore-errors.md
Last active May 13, 2020
cloud-nuke ignore-errors output
View cloud-nuke-ignore-errors.md
INFO[2020-05-06T19:31:10+05:30] The following resources types will be nuked:
INFO[2020-05-06T19:31:10+05:30] - ami
INFO[2020-05-06T19:31:10+05:30] - asg
INFO[2020-05-06T19:31:10+05:30] - ebs
INFO[2020-05-06T19:31:10+05:30] - ec2
INFO[2020-05-06T19:31:10+05:30] - ecsserv
INFO[2020-05-06T19:31:10+05:30] - eip
INFO[2020-05-06T19:31:10+05:30] - ekscluster
INFO[2020-05-06T19:31:10+05:30] - elb
@saurabh-hirani
saurabh-hirani / cloud-nuke-ignore-errors.md
Created May 13, 2020
cloud-nuke ignore-errors output
View cloud-nuke-ignore-errors.md
INFO[2020-05-06T19:31:10+05:30] The following resources types will be nuked:
INFO[2020-05-06T19:31:10+05:30] - ami
INFO[2020-05-06T19:31:10+05:30] - asg
INFO[2020-05-06T19:31:10+05:30] - ebs
INFO[2020-05-06T19:31:10+05:30] - ec2
INFO[2020-05-06T19:31:10+05:30] - ecsserv
INFO[2020-05-06T19:31:10+05:30] - eip
INFO[2020-05-06T19:31:10+05:30] - ekscluster
INFO[2020-05-06T19:31:10+05:30] - elb
@saurabh-hirani
saurabh-hirani / cloud-nuke-ignore-errors.md
Created May 13, 2020
cloud-nuke ignore-errors output
View cloud-nuke-ignore-errors.md
INFO[2020-05-06T19:31:10+05:30] The following resources types will be nuked:
INFO[2020-05-06T19:31:10+05:30] - ami
INFO[2020-05-06T19:31:10+05:30] - asg
INFO[2020-05-06T19:31:10+05:30] - ebs
INFO[2020-05-06T19:31:10+05:30] - ec2
INFO[2020-05-06T19:31:10+05:30] - ecsserv
INFO[2020-05-06T19:31:10+05:30] - eip
INFO[2020-05-06T19:31:10+05:30] - ekscluster
INFO[2020-05-06T19:31:10+05:30] - elb
View setup-virtualenv.md

Steps to install and activate virtualenv:

  1. Install virtualenv module:

    # sudo pip3 install virtualenv

  2. Change to project directory:

    # python3 -m virtualenv venv

@saurabh-hirani
saurabh-hirani / rake-release.md
Created Feb 1, 2020
Rakefile semantic versioning
View rake-release.md

Semantic versioning intro

This repo uses semantic versioning for tagging releases. Read semantic versioning basics here

Release patch version

rake release
@saurabh-hirani
saurabh-hirani / EC2API-go.diff
Created Oct 1, 2019
diff between older EC2API.go and newer EC2API.go for cloud-nuke
View EC2API-go.diff
$ diff EC2API.go /var/tmp/newer-EC2API.go
388,437d387
< // ApplySecurityGroupsToClientVpnTargetNetwork mocks base method
< func (m *MockEC2API) ApplySecurityGroupsToClientVpnTargetNetwork(arg0 *ec2.ApplySecurityGroupsToClientVpnTargetNetworkInput) (*ec2.ApplySecurityGroupsToClientVpnTargetNetworkOutput, error) {
< m.ctrl.T.Helper()
< ret := m.ctrl.Call(m, "ApplySecurityGroupsToClientVpnTargetNetwork", arg0)
< ret0, _ := ret[0].(*ec2.ApplySecurityGroupsToClientVpnTargetNetworkOutput)
< ret1, _ := ret[1].(error)
View test_grequests_output_with_patch.log
# python3 test_grequests.py
2019-04-14 23:31:43,698 START
2019-04-14 23:31:43,724 Starting new HTTPS connection (1): localhost:8082
2019-04-14 23:31:43,725 Starting new HTTPS connection (1): localhost:8082
2019-04-14 23:31:43,726 Starting new HTTPS connection (1): localhost:8082
2019-04-14 23:31:43,727 Starting new HTTPS connection (1): localhost:8082
2019-04-14 23:31:43,728 Starting new HTTPS connection (1): localhost:8082
2019-04-14 23:31:43,728 Starting new HTTPS connection (1): localhost:8082
2019-04-14 23:31:43,729 Starting new HTTPS connection (1): localhost:8082
2019-04-14 23:31:43,730 Starting new HTTPS connection (1): localhost:8082
View test_grequests_output_without_patch.log
# python3 test_grequests.py
2019-04-14 23:30:41,697 START
2019-04-14 23:30:41,721 Starting new HTTPS connection (1): localhost:8082
2019-04-14 23:30:41,722 Starting new HTTPS connection (1): localhost:8082
2019-04-14 23:30:41,723 Starting new HTTPS connection (1): localhost:8082
2019-04-14 23:30:41,724 Starting new HTTPS connection (1): localhost:8082
2019-04-14 23:30:41,725 Starting new HTTPS connection (1): localhost:8082
2019-04-14 23:30:41,726 Starting new HTTPS connection (1): localhost:8082
2019-04-14 23:30:41,727 Starting new HTTPS connection (1): localhost:8082
View test_grequests.py
#!/usr/bin/env python
from __future__ import print_function
import gevent_openssl
gevent_openssl.monkey_patch()
import grequests
import logging
import urllib3
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
You can’t perform that action at this time.