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)
  • 05:01 (UTC)
View GitHub Profile
@aleks-mariusz
aleks-mariusz / README.md
Last active January 22, 2026 18:12
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 / safari-open-pages.py
Created August 24, 2014 16:35
This script fetches the current open tabs in all Safari windows. Useful to run remotely on your mac when you are at work and want to read a page you have open (remotely) at home but don't remember the url but can log in to your home system on the command line
#!/usr/bin/python
#
# This script fetches the current open tabs in all Safari windows.
# Useful to run remotely on your mac when you are at work and want
# to read a page you have open (remotely) at home but don't remember
# the url but can log in to your home system on the cmmand line
#
import sys
@aleks-mariusz
aleks-mariusz / _index.md
Last active September 13, 2024 18:49
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

@aleks-mariusz
aleks-mariusz / XL_list_of_BNGs
Last active May 15, 2021 09:15
script to download the Ordnance Survey tiles from streetmap.co.uk (not related to OpenStreetMaps) specifically the Explorer (1:25000) and LandRanger (1:50000) maps, takes as an argument a .tfw or .tab (tarball included) for a segment. See https://upload.wikimedia.org/wikipedia/commons/f/f5/Ordnance_Survey_National_Grid.svg for info about the gri…
HP40NE
HP40SE
HP50NE
HP50NW
HP50SE
HP50SW
HP51NE
HP51SE
HP60NE
HP60NW
{
"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 / centos75-minimal.ks
Last active July 26, 2018 18:06
got centos 7.5 down to about 180 packages - around 600 meg installed, note: i removed xfsprogs because i'm using ext2, if you use xfs you may want to remove e2fs* instead
install
skipx
text
eula --agreed
lang en_US.UTF-8
keyboard us
timezone Europe/London
# Use network installation
@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