Skip to content

Instantly share code, notes, and snippets.

@The-Edward
The-Edward / install-kubernetes-flannel-centos7.md
Created April 4, 2022 17:15 — forked from rkaramandi/install-kubernetes-flannel-centos7.md
Installing Kubernetes with the Flannel Network Plugin on CentOS 7

Install Prerequisites on ALL (Worker and Master) Nodes

Let's remove any old versions of Docker if they exist:

sudo yum remove docker \
                  docker-common \
                  docker-selinux \
                  docker-engine
@The-Edward
The-Edward / id_rsa_encryption.md
Created December 7, 2021 17:40
Encrypt/Decrypt a File using your SSH Public/Private Key on Mac OS X

A Guide to Encrypting Files with Mac OS X

This guide will demonstrate the steps required to encrypt and decrypt files using OpenSSL on Mac OS X. The working assumption is that by demonstrating how to encrypt a file with your own public key, you'll also be able to encrypt a file you plan to send to somebody else using their private key, though you may wish to use this approach to keep archived data safe from prying eyes.

Too Long, Didn't Read

Assuming you've already done the setup described later in this document, that id_rsa.pub.pcks8 is the public key you want to use, that id_rsa is the private key the recipient will use, and secret.txt is the data you want to transmit…

Encrypting

$ openssl rand 192 -out key

$ openssl aes-256-cbc -in secret.txt -out secret.txt.enc -pass file:key

@The-Edward
The-Edward / benchmark-commands.md
Created November 26, 2021 18:45 — forked from ueokande/benchmark-commands.md
Kafka Benchmark Commands

Benchmark commands

Producer

Setup

bin/kafka-topics.sh \
  --zookeeper zookeeper.example.com:2181 \
  --create \
@The-Edward
The-Edward / 1-setup.md
Created June 16, 2021 07:59 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

Last updated March 28, 2021

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

@The-Edward
The-Edward / version-up.sh
Created June 1, 2021 19:22 — forked from OleksandrKucherenko/version-up.sh
Calculate Next Suitable Version Tag for Your Git based project
#!/usr/bin/env bash
## Copyright (C) 2017, Oleksandr Kucherenko
## Last revisit: 2017-09-29
# For help:
# ./versionip.sh --help
# For developer / references:
# https://ryanstutorials.net/bash-scripting-tutorial/bash-functions.php
# http://tldp.org/LDP/abs/html/comparison-ops.html
RUN echo "https://mirror.yandex.ru/mirrors/alpine/v3.7/main" > /etc/apk/repositories \
&& echo "https://mirror.yandex.ru/mirrors/alpine/v3.7/community" >> /etc/apk/repositories \
&& echo "https://mirror.yandex.ru/mirrors/alpine/v3.5/main" >> /etc/apk/repositories \
@The-Edward
The-Edward / install-openvpn-24.sh
Created November 27, 2020 07:51 — forked from tienthanh2509/install-openvpn-24.sh
Install OpenVPN 2.4.x on Ubuntu 16.04 Xenial
curl -s https://swupdate.openvpn.net/repos/repo-public.gpg | apt-key add -
echo "deb http://build.openvpn.net/debian/openvpn/stable xenial main" > /etc/apt/sources.list.d/openvpn-aptrepo.list
apt update
apt install -y openvpn
@The-Edward
The-Edward / fpm.py
Created November 9, 2020 10:46 — forked from phith0n/fpm.py
Fastcgi PHP-FPM Client && Code Execution
import socket
import random
import argparse
import sys
from io import BytesIO
# Referrer: https://github.com/wuyunfeng/Python-FastCGI-Client
PY2 = True if sys.version_info.major == 2 else False
@The-Edward
The-Edward / kafka.md
Created November 3, 2020 12:59 — forked from ashrithr/kafka.md
kafka introduction

Introduction to Kafka

Kafka acts as a kind of write-ahead log (WAL) that records messages to a persistent store (disk) and allows subscribers to read and apply these changes to their own stores in a system appropriate time-frame.

Terminology:

  • Producers send messages to brokers
  • Consumers read messages from brokers
  • Messages are sent to a topic
$ token="$(curl -fsSL "https://auth.docker.io/token?service=registry.docker.io&scope=repository:library/debian:pull" | jq --raw-output '.token')"
nisha@ubuntu ~ $ manifest="$(curl -fsSL -H "Authorization: Bearer $token" -H "Accept: application/vnd.docker.distribution.manifest.v2+json" "https://index.docker.io/v2/library/debian/manifests/sha256:e8bab439d86e39a0f694344ab0c11f77bce1460c13c903c437ee9da69c7b6fa3")"
nisha@ubuntu ~ $ echo $manifest | sha256sum
edb9b33918300be33fb87aa3b451493b94d0290edc9de95caae90f754996d0df -