Skip to content

Instantly share code, notes, and snippets.

View aleks-mariusz's full-sized avatar

aleks mariusz aleks-mariusz

  • Cambridge, UK (formerly, London, UK, and NYC)
  • 23:11 (UTC +01:00)
View GitHub Profile
@aleks-mariusz
aleks-mariusz / README.md
Created September 3, 2026 10:51
Slack Cmd+Shift+A Fix

Slack Cmd+Shift+A Hijacking Fix

Chrome has this fantastic ability to search through your (hundreds of) tabs, using cmd+shift+A (or ctrl+shift+A on systems without a cmd keyboard key).

Unfortunately, the Slack company has decided that it would not be an issue to re-use the same keyboard shortcut in both its web-app and the browser app. So if you use Slack in the browser, and your current chrome tab is viewing slack, your usual (and soon to be favourite) chrome-keyboard shortcut won't do what you expect.

This has been rather frustrating, and when asking Slack support to please fix their hijacking of this browser keyboard shortcut, their response was one of indifference (and suggesting i use Slack in the app.. another app?? no thanks).

Thus i had to take matters into my own hands, and put together this "fix" myself -

@aleks-mariusz
aleks-mariusz / README.md
Last active May 20, 2026 13:29
VLAN Support for Debian debootstrap-based Installer

VLAN Support for Debian debootstrap-based Installer

Overview

This solution (re-)adds VLAN (802.1Q) support to Debian installer's network configuration (netcfg), enabling automated installations on VLAN-tagged networks using both DHCP and static IP configurations.

Key Features:

  • ✅ DHCP on VLAN interfaces
  • ✅ Static IP on VLAN interfaces
  • ✅ Works with standard Debian installer (bookworm/stable)
@aleks-mariusz
aleks-mariusz / _index.md
Last active March 31, 2026 10:26
setting up VCSA 7.0.3 (vCenter Server Appliance v7.x) in LibVirt/KVM/QEMU

Running a VCSA 7.0.3 (VCenter Server Appliance v7.x) on KVM/libvirtd - using virsh/virt-install

I came across this helpful gist where it described trying this with an old version of the VCSA (v6.0) using Ansible.

While I am not using ansible directly (yet), I was able to use the steps there as a starting point and adapt the workflow to be able to bring-up VCSA v7.0.3 in libvirt/KVM.. It should work for any 7.x version, but no guarentees if it will work with VCSA v8.x

There were some slight things i had to adapt (namely, the guestfish commands; the filesystem layout changed since this ansible workbook was created in the newer version of the VCSA).

Environment

{
"cniVersion": "0.4.0",
"name": "podman",
"plugins": [
{
"type": "bridge",
"bridge": "cni-podman0",
"isGateway": true,
"ipMasq": false,
"ipam": {
@aleks-mariusz
aleks-mariusz / sync-all.sh
Created August 20, 2019 13:42
yum repo sync script
#!/usr/bin/env bash
EL_VERSION=7
LOG=/tmp/.sync-attempt-out.$$
TIMESTAMP_FILE=/var/tmp/.sync-newer.$$
YUM_BASE=/data/yum${EL_VERSION}
YUM_REPOS_DIR=/etc/yum${EL_VERSION}.repos.d
YUM_CONF=/etc/yum_${EL_VERSION}.conf
@aleks-mariusz
aleks-mariusz / 06-fluentd-daemonset.yaml
Last active September 25, 2018 18:35
set of fluentd configs for kubernetes aggregated logging into elasticsearch using fluentd, on k8s v1.11+ using docker 1.13+ on centos 7 - kubectl apply the 06-fluentd-daemonset.yaml after placing the other files below into a directory (such as "fluentd-configs") and create configmap using: kubectl -n monitoring create configmap es-fluentd --from…
---
# Source: fluentd-elasticsearch/templates/service-account.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: es-fluentd
namespace: monitoring
labels:
app: fluentd
kubernetes.io/cluster-service: "true"
@aleks-mariusz
aleks-mariusz / node1.sh
Last active July 30, 2018 08:36
kubernetes v1.11.1 - HA setup scripts for centos 7.x used (kickstart file used: https://gist.github.com/aleks-mariusz/f01f3177a13f1e86e4088e5b6c7f278d) - need to also set up keepalived on 2nd/3rd node and replace socat with nginx
#!/bin/sh
INTERFACE=eth0
NETMASK_CIDR='/24' # 255.255.255.0
LOAD_BALANCER_IP=192.168.1.100
LOAD_BALANCER_DNS=api-k8s-lab
LOAD_BALANCER_PORT=6443
CP_PORT=6443
CP0_HOSTNAME=k8s-lab1
@aleks-mariusz
aleks-mariusz / key_dist.py
Last active April 26, 2017 23:02
used to distributing keys to different systems uniquely.. takes on standard input and distributes it uniquely to all clients hitting the /k endpoint
#!/usr/bin/env python
import atexit
import functools
import gzip
import itertools
import logging
import os
import socket
import sys
@aleks-mariusz
aleks-mariusz / find_stale_metrics.py
Created February 9, 2017 21:52
This utiilty helps to find metrics in graphite whisper format that haven't been updated in a preset number of days
#!/usr/bin/python
import optparse # argparse not available since most systems still have python 2.6 (argparse is in 2.7)
import os
import sys
import time
# helper function to return the parent dir given a dir
parent_of = lambda p: os.path.sep.join( p.split( os.path.sep )[:-1] )
@aleks-mariusz
aleks-mariusz / post-install
Last active January 12, 2017 14:22
xenserver7 automated (unattended) installation using cobbler, a trigger script to work with cobbler.sync, also the post-install depends on this answerfile (treated as a kickstart file by cobbler) - sets up small OS partition, and whatever left over space as the xen-storage-repository, installs gluster, and if two disks of same size seen, mirrors…
#!/bin/bash
if [[ $1 -ne 0 ]]; then
echo "ERROR: failed install, backing out changes"
mdadm --stop /dev/md{0,1,2,3}
mdadm --zero-superblock /dev/sd{a,b}{1,4,5,6}
sgdisk --zap /dev/sdb
exit
fi