Skip to content

Instantly share code, notes, and snippets.

version: '3.8'
services:
clickhouse-keeper-0:
image: "clickhouse/clickhouse-keeper:24.1.5.6"
user: "101:101"
container_name: clickhouse-keeper-0
hostname: clickhouse-keeper-0
volumes:
- ${PWD}/keeper_config.xml:/etc/clickhouse-keeper/keeper_config.xml
- ${PWD}/keeper_config_overrides.xml:/etc/clickhouse-keeper/keeper_config_overrides.xml
@odinsy
odinsy / record.md
Created February 22, 2024 11:48 — forked from lopesivan/record.md
Record tmux session

If you want to record your fancy tmux session with all windows and splits recorded you can do it in the following way:

  • setup your tmux session (tmux new -s session-name, create windows, splits, start processes in them)
  • detach (prefix+d)
  • run asciinema rec -c "tmux attach -t session-name"
  • when you're finished, just detach the session again
@odinsy
odinsy / Betaflight for ubuntu
Created February 27, 2023 17:19 — forked from wlgrd/Betaflight for ubuntu
How to set up betaflight fc with Ubuntu
1. Create a rule for the DFU
$ (echo '# DFU (Internal bootloader for STM32 MCUs)' echo 'ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="plugdev"') | sudo tee /etc/udev/rules.d/45-stdfu-permissions.rules > /dev/null
2. Monitor connection and find your model (unplug/plug the fc while this cmd is active)
$ udevadm monitor --environment --udev | grep ID_MODEL_ID
3. Update the /etc/udev/rules.d/45-stdfu-permissions.rules file with your model. E.g, my MODEL_ID is 5740, and the .rules file
ends up like this:
@odinsy
odinsy / .gitlab-ci.yml
Created December 22, 2022 08:08 — forked from bamnet/.gitlab-ci.yml
Multiarch Go Builds
image: docker:latest
services:
- docker:dind
stages:
- build
variables:
IMAGE: registry.gitlab.com/bamnet/njtdata
DOCKER_CLI_EXPERIMENTAL: enabled
#!/usr/bin/env python
import json, requests, base64, sys, os, re, socket
slack_url = "https://hooks.slack.com/services/###MYKEYHERE#####"
def main():
consul_stdin = json.load(sys.stdin)
getSVCStatus(consul_stdin)
scrape_configs:
- job_name: monitoring
ec2_sd_configs:
- region: us-east-1
port: 9100
relabel_configs:
- action: replace
regex: ".*"
replacement: /var/log/nginx/access.log
target_label: __path__
@odinsy
odinsy / 01.service_config.rb
Last active December 18, 2019 11:46
erb-template to configmap migration libs example
# Library for rendering config from template
require 'erb'
class ServiceConfig
attr_accessor :template, :settings
def initialize(template, settings)
@template = template
@settings = settings
@odinsy
odinsy / kubernetes_add_service_account_kubeconfig.sh
Created October 10, 2019 15:35 — forked from innovia/kubernetes_add_service_account_kubeconfig.sh
Create a service account and generate a kubeconfig file for it - this will also set the default namespace for the user
#!/bin/bash
set -e
set -o pipefail
# Add user to k8s using service account, no RBAC (must create RBAC after this script)
if [[ -z "$1" ]] || [[ -z "$2" ]]; then
echo "usage: $0 <service_account_name> <namespace>"
exit 1
fi
@odinsy
odinsy / rules-ipv4.iptables
Created April 24, 2019 19:42 — forked from v2px/rules-ipv4.iptables
replaced obsolete state match with conntrack
###############################################################################
# Copyright 2012 Jakub Jirutka. All rights reserved.
#
# "THE KOFOLA-WARE LICENSE" (Revision 1):
# Jakub Jirutka originally wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a Kofola in return. <jakub@jirutka.cz>
#
###############################################################################
az aks create \
--resource-group livetex \
--name livetex-dev-cluster \
--kubernetes-version 1.12.6 \
--node-count 1 \
--node-vm-size Standard_D1_v2 \
--enable-vmss \
--enable-cluster-autoscaler \
--min-count 1 \
--max-count 3 \