Skip to content

Instantly share code, notes, and snippets.

View mouchar's full-sized avatar

Robert Moucha mouchar

View GitHub Profile
@mouchar
mouchar / docker-compose.yml
Created February 16, 2024 11:56
GoodData.CN CE in docker-compose
# Installation instructions
# * Create EC2 instance c6a.xlarge with public IP address
# * Enable access to SSH (22/tcp), HTTP (80/tcp), and HTTPS (443/tcp) ports
# * Add A record for instance public IP to your DNS zone (e.g. gooddata.example.com)
# * Install docker:
# sudo yum update -y
# sudo yum install -y docker
# sudo service docker start
# sudo usermod -a -G docker ec2-user
# * Install docker-compose:
@mouchar
mouchar / external-dns.sh
Last active October 9, 2023 16:15
GDCN deployment on azure
# Start of Configuration section
#export RESOURCE_GROUP="gooddata-dev"
#export LOCATION="eastus"
#export SERVICE_ACCOUNT_NAMESPACE="external-dns"
#export SERVICE_ACCOUNT_NAME="external-dns"
#export USER_ASSIGNED_IDENTITY_NAME="externalDns"
#export FEDERATED_IDENTITY_CREDENTIAL_NAME="externalDns"
#export AKS_CLUSTER_NAME="aks-dev"
#export AZURE_DNS_ZONE="example.com"
#export DNS_RESOURCE_GROUP="dns-rg"
@mouchar
mouchar / deploy.sh
Created June 30, 2022 22:00
Featurehub with postgresql-ha, running in kind cluster
#!/bin/bash
# Reproducer for https://github.com/featurehub-io/featurehub/issues/801
# Set your OAuth2 client and secret in variables as in example:
# CLIENT_ID="Google OAuth2 client_id" CLIENT_SECRET="Google OAuth2 secret" ./deploy.sh
# Required SW: kubectl, docker, kind and helm
: "${CLIENT_ID:?Client id is missing}"
: "${CLIENT_SECRET:?Client secret is missing}"
set -e
@mouchar
mouchar / bt
Created April 19, 2022 08:05
Bluetooth headphones control
#!/bin/bash
# Connect or disconnect headphones
# Config (update to your value!):
ADDRESS=14:3F:A6:DA:XX:YY
# Sets BT_NAME, BT_PAIRED BT_TRUSTED BT_CONNECTED (last three are yes/no)
eval "$(bluetoothctl info $ADDRESS | \
awk '
@mouchar
mouchar / README.md
Last active July 16, 2021 08:40
GoodData.CN Support bundle

GoodData.CN Support bundle

Collect basic information from the Kubernetes cluster and creates a single archive file that can be submitted for later analysis.

Sensitive data (like Secrets) are not collected. Other potentially sensitive data (usernames, passwords, IP addresses) are redacted.

This tool is Open Source, written by Replicated. You can find the source code in this repository and documentation here.

How to generate a support bundle

Keybase proof

I hereby claim:

  • I am mouchar on github.
  • I am mouchar (https://keybase.io/mouchar) on keybase.
  • I have a public key ASAXoofc7akyzU3Gt0rqGC0G_HOiu2P_HqiUnRxSNYqE-wo

To claim this, I am signing this object:

@mouchar
mouchar / build_chromium_headless.sh
Last active May 4, 2018 07:55
Simple script to build headless_shell from Chromium project
#!/bin/sh
# Config, change according to your env
# where the build is made - You need ~20GB of free space!
basedir=/mnt/chromium
# subdir of $basedir, where you'll find the build results
outdir=out/Headless
# version to be built
# taken from 3rd column of http://omahaproxy.appspot.com/all?os=linux&channel=stable
version=64.0.3282.140
@mouchar
mouchar / yaml_filter.py
Last active August 23, 2017 14:42
Vim filter to reformat icinga_services in c-d-c
#!/usr/bin/env python2
"""
Simple filter to convert icinga_services string to list
Use with Vim:
1. Select whole lines (using Shift-V) of the icinga_services
(upto very last line, usually containing a single '"')
2. Pipe selection through this filter:
:'<,'>! /path/to/yaml_filter.py
3. Whole icinga_services attribute should be rewritten.
"""
@mouchar
mouchar / server.go
Created July 31, 2017 13:30
Simple HTTP responder
/*ex:ft=go:ts=4:sw=4
Simple HTTP responder. I listens on one or more TCP ports
and logs all requests that come to these ports. There are
two ways how to tell the server the ports where it should listen:
1) command-line:
./server 8080 1234 7777
It will listen on ports 8080, 1234 and 7777. Generated port
names will be assigned to every port, like "port_8080" etc.