Skip to content

Instantly share code, notes, and snippets.

Sergey Karatkevich kevit

View GitHub Profile
View gist:837e9f18cea7db00b8cd33bc418f9e05
## group without clustering
with Diagram("AcctCreation", show=False):
begin = (
SQS("KickoffQueue")
>> Lambda("AcctCreate")
>> StepFunctions("StepFunctions")
)
with Cluster("StateMchne"):
with Cluster("Cncrrntx3.1"):
View gist:c21bb21e8415d95a95e9ff193604fde3
---
- hosts: all
connection: local
tasks:
- name: Get a cert from an https port
get_certificate:
host: "www.google.com"
port: 443
register: cert
@kevit
kevit / urllib2_ssl.py
Created May 29, 2020 — forked from cfangmeier/urllib2_ssl.py
SSL client/server certificates verification for `urllib2`. :python:ssl:
View urllib2_ssl.py
"""SSL client/server certificates verification for `urllib2`.
see: https://gist.github.com/zed/1347055
It works on Python 2.6, 2.7, 3.1, 3.2
Example::
>>> import urllib2, urllib2_ssl
>>> opener = urllib2.build_opener(urllib2_ssl.HTTPSHandler(
View pytest
--tc-file=TESTCONFIG
myapp:
servers:
main_server: 10.1.1.1
secondary_server: 10.1.1.2
from pytest_testconfig import config
def test_foo():
main_server = config['myapp']['servers']['main_server']
View gist:04c1df9cee5405e11e478d395aad549a
def create_elb(self,subnets,name,type='app',region='us-east-1',sg=['sg-c5556eb1']):
if type == 'app':
type = 'application'
else:
type = 'network'
elb_creation = self.elbv2_client.create_load_balancer(
Name=name,
Subnets=subnets,
SecurityGroups=sg,
Scheme='internet-facing',
View gist:a2d2a8186eab33b9867776807352c7ff
elbv2_response = boto3.client("elbv2")
if elbv2_response is not None:
v2_load_balancers = elbv2_response.describe_load_balancers()
else:
v2_load_balancers = None
##not implemented rules
rules = get_alb_rules(listener_arn)
View lab.ps1
"$(Get-Date) This is a test." | Out-File -FilePath "C:\Users\Public\TestFile.txt" -Append
View keybase.md

Keybase proof

I hereby claim:

  • I am kevit on github.
  • I am kevit (https://keybase.io/kevit) on keybase.
  • I have a public key ASABmacurWeCH2DQLGnoxrzqVxbQyEIOfg9sDZXWfjZmLAo

To claim this, I am signing this object:

View gist:29958a93780f267e3c3a75a330fde565
from flask import Flask, jsonify
from flask import request
from flask import abort
import random
import string
import docker
app = Flask(__name__)
#curl -X POST http://127.0.0.1:5000
View gist:480e2c0cf0e518fef87cd30a4e3497d3
restic snapshots -r /backup -p pass --json | jq -r '.[-1].time|strptime("%Y-%m-%dT%H:%M:%S.%Z")|mktime'
You can’t perform that action at this time.