Skip to content

Instantly share code, notes, and snippets.

View odg0318's full-sized avatar
๐Ÿ˜€

Donny odg0318

๐Ÿ˜€
View GitHub Profile
# HELP deployment_block_processing_duration Measures duration of block processing for a subgraph deployment
# TYPE deployment_block_processing_duration histogram
deployment_block_processing_duration_bucket{deployment="QmSR2hWJ5SrZd42y6W1SJtf8x7DtuqwyhJAQALvGXmpGw1",le="0.05"} 9102
deployment_block_processing_duration_bucket{deployment="QmSR2hWJ5SrZd42y6W1SJtf8x7DtuqwyhJAQALvGXmpGw1",le="0.2"} 9102
deployment_block_processing_duration_bucket{deployment="QmSR2hWJ5SrZd42y6W1SJtf8x7DtuqwyhJAQALvGXmpGw1",le="0.7"} 9102
deployment_block_processing_duration_bucket{deployment="QmSR2hWJ5SrZd42y6W1SJtf8x7DtuqwyhJAQALvGXmpGw1",le="1.5"} 9102
deployment_block_processing_duration_bucket{deployment="QmSR2hWJ5SrZd42y6W1SJtf8x7DtuqwyhJAQALvGXmpGw1",le="4"} 9102
deployment_block_processing_duration_bucket{deployment="QmSR2hWJ5SrZd42y6W1SJtf8x7DtuqwyhJAQALvGXmpGw1",le="10"} 9102
deployment_block_processing_duration_bucket{deployment="QmSR2hWJ5SrZd42y6W1SJtf8x7DtuqwyhJAQALvGXmpGw1",le="60"} 9102
deployment_block_processing_dura
@odg0318
odg0318 / Dockerfile
Last active March 27, 2020 02:50
Right use entrypoint and cmd in Dockerfile
FROM alpine:3.11
COPY entrypoint.sh /entrypoint.sh
COPY process.sh /process.sh
RUN chmod +x /entrypoint.sh /process.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/process.sh"]
import datetime
import ipaddress
from cryptography import x509
from cryptography.x509.oid import NameOID, ExtendedKeyUsageOID
from cryptography.hazmat.primitives import hashes
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.asymmetric import rsa
@odg0318
odg0318 / README.md
Last active December 20, 2017 06:41
OpenVPN Site to Site Configuration

Overview

  • OpenVPN Server Subnet: 10.1.0.0
  • OpenVPN Client Subnet: 10.2.0.0

All of certifications are generated by easyrsa utility.

References

@odg0318
odg0318 / ca.md
Created November 24, 2017 02:02 — 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.

@odg0318
odg0318 / envargs.py
Last active September 28, 2017 06:31
argparse with envrionment in python.
import argparse
import os
class EnvDefault(argparse.Action):
def __init__(self, env, **kwargs):
default = kwargs.get('default', False)
required = kwargs.get('required', False)
if env and env in os.environ:
sudo apt-get install software-properties-common
sudo apt-add-repository -y ppa:rael-gc/rvm
sudo apt-get update
sudo apt-get install rvm
source /etc/profile.d/rvm.sh