Skip to content

Instantly share code, notes, and snippets.

View Mykolaichenko's full-sized avatar
🎯
Focusing

Oleg Mykolaichenko Mykolaichenko

🎯
Focusing
View GitHub Profile
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-all
namespace: ${namespace}
spec:
podSelector: {}
policyTypes:
- Ingress
@Mykolaichenko
Mykolaichenko / yml
Last active October 17, 2019 11:52
Envoy as TCP proxy: helpful config parts
## Server configuration example
#
# In our relal case we have x4 address block in listener and x4 name block in cluster
#
static_resources:
listeners:
- address:
socket_address:
address: 0.0.0.0
@Mykolaichenko
Mykolaichenko / prometheus-envoy.yml
Created January 3, 2019 10:51
Prometheus Envoy Consul relabel_configs
- job_name: "envoy-proxy-service"
metrics_path: "/stats/prometheus"
consul_sd_configs:
- server: "localhost:8500"
scheme: "http"
services:
- envoy-client
- envoy-aws-server
- envoy-sj-server
@Mykolaichenko
Mykolaichenko / bumpme
Last active July 5, 2017 11:07
bumpme
Wed Jul 5 11:07:24 UTC 2017
@Mykolaichenko
Mykolaichenko / puzzle.py
Last active June 19, 2021 05:59
python puzzle generator and finder
# It's sceleton for puzzle creating and searching in python
# Btw 1 hour it's little time for done it, I've implemented main features
# - creating puzzle by X and Y including consistently words (and reverse) without diagonal
# - creating searching for consistently and reverse words
# - it may be implemented additional functions for each object for implement not done logic
# It's just a quick simple representation without unit tests and tox
# Example usage: python puzzly.py -y 8 -x 8
# Exampel usage 2: python puzzly.py
# Fully tested on Python 2.7.11
# UPD: words.txt may be located in the same directory as script
@Mykolaichenko
Mykolaichenko / shell_wrapper.py
Created May 4, 2017 07:49
Python wrapper for shell commands
# Wrapper for shell command in Python
from subprocess import Popen
class ShellCommand(object):
def __init__(self, command):
self.command = command
self.stdout = None
self.stderr = None
self.code = None