Skip to content

Instantly share code, notes, and snippets.

@dylanroy
dylanroy / Sample Architecture Diagram
Last active April 2, 2024 15:01
Code snippets from Medium Blog Post Create Beautiful Architecture Diagrams with Python
from diagrams import Cluster, Diagram
from diagrams.gcp.analytics import BigQuery, Dataflow, PubSub
from diagrams.gcp.compute import AppEngine, Functions
from diagrams.gcp.database import BigTable
from diagrams.gcp.iot import IotCore
from diagrams.gcp.storage import GCS
with Diagram("Media Monitoring Storage Architecture", show=False) as med_diag:
pubsub = PubSub("pubsub")
flow = Dataflow("DataFlow")
@3ng1n33r
3ng1n33r / docker-compose.yaml
Created June 3, 2020 04:41
Zabbix 5.0 docker compose (with mysql database support)
version: '3.5'
services:
zabbix-server:
image: zabbix/zabbix-server-mysql:alpine-5.0-latest
container_name: zabbix-server
ports:
- "10051:10051"
networks:
zabbix_network:
ipv4_address: 172.18.0.5
@Nachtalb
Nachtalb / telegram-desktop-multiple-accounts.rst
Last active June 25, 2024 04:10
Add multiple accounts in Telegram Desktop [Linux | MacOSX | Windows]
@rdump
rdump / kubectl-multi-version-brews.md
Last active April 4, 2024 15:20
kubectl multi-version brews (kubernetes-cli formula)

kubectl multi-version brews

Applicability

The instructions below apply to older versions of Homebrew which still provide switch capability.

For current Homebrew, you'll likely need to keep Versions around, and build locally. Here's my versions repository https://github.com/rdump/homebrew-versions

MacPorts is now keeping versioned installations available as well, by default.

@bborysenko
bborysenko / tf-gcs-bootstrap.sh
Created April 12, 2018 14:54
Setting up Terraform GCS remote backend
#!/usr/bin/env bash
set -u
set -e
set -o pipefail
GCP_PROJECT="$(gcloud config list --format 'value(core.project)')"
GCP_SERVICES=(
"storage-api.googleapis.com"
@peatiscoding
peatiscoding / build-tag-push.py
Created January 24, 2018 15:20
a script to convert your docker-compose.yml (version 2) with build node to image node; this script required DOCKERHUB_USER environment available.
#!/usr/bin/python
import os
import subprocess
import time
import yaml
import re
user_name = os.environ.get("DOCKERHUB_USER")
@AleksandrMihhailov
AleksandrMihhailov / multi-telegram.sh
Created January 10, 2018 04:47
Run multiple Telegram client instances on macOS
# replace you in folder path with your macOS system account name
# create empty folder in your HOME path (replace empty_folder with your name)
/Applications/Telegram.app/Contents/MacOS/Telegram -many -workdir /Users/you/empty_folder
@gschmutz
gschmutz / docker-compose.yml
Last active July 4, 2024 00:27
Docker Compose with Kafka Single Broker, Connect, Schema-Registry, REST Proxy, Kafka Manager
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper:3.3.0
hostname: zookeeper
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: 2181
@mcfdn
mcfdn / Multiple Deploy Keys in GitHub.md
Last active November 21, 2022 14:02
Using multiple GitHub deploy keys on a single server with a single user

Using multiple GitHub deploy keys on a single server with a single user

Within GitHub it is possible to set up two types of SSH key - account level SSH keys and and repository level SSH keys. These repository level SSH keys are known in GitHub as deploy keys.

Deploy keys are useful for deploying code because they do not rely on an individual user account, which is susceptible to change, to “store” the server keys.

There is, however, an ‘issue’ with using deploy keys; each key across all repositories on GitHub must be unique. No one key can be used more than once. This becomes a problem when deploying to repositories to the same server with the same user. If you create two keys, the SSH client will not know which key to use when connecting to GitHub.

One solution is to use an SSH config file to define which key to use in which situation. This isn’t as easy as it seems.. you might try something like this: