Skip to content

Instantly share code, notes, and snippets.

View bplasmeijer's full-sized avatar
⛑️
24x7

Bart Plasmeijer bplasmeijer

⛑️
24x7
View GitHub Profile
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <TlHelp32.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#define printerr(e) (fprintf(stderr, e))
@bplasmeijer
bplasmeijer / sitecore-image-tagging.md
Last active January 15, 2020 15:39 — forked from pbering/sitecore-image-tagging.md
Sitecore Docker Image Tagging

Naming and tagging

...

Naming convention

[REGISTRY/]sitecore-<TOPOLOGY>-<ROLE>[-VARIANT[-VARIANT]]:<SITECORE_VERSION>[-VARIANT_VERSION[-VARIANT_VERSION]]-<OS_REPOSITORY>-<OS_TAG>
@bplasmeijer
bplasmeijer / k9s-setup.sh
Last active April 9, 2025 19:44
set-up K9S on #WSL2
#!/bin/bash
set -e
source <(curl -sSL benco.io/lib) # Load libary from remote URL, it's safe!
GITHUB="derailed/k9s"
VERSION=${1:-"$(get_latest_release $GITHUB)"}
INSTALL_DIR=${2:-"$HOME/.local/bin"}
CMD=k9s
NAME="k9s terminal UI for Kubernetes"
@bplasmeijer
bplasmeijer / install.sh
Last active February 26, 2021 09:53 — forked from RMerl/gist:fe9441e807788bf8777b9bb9cceb1822
Early notes - building Asuswrt-Merlin under WSL2
sudo dpkg --add-architecture i386
sudo apt update
sudo apt-get install libtool-bin cmake libproxy-dev uuid-dev liblzo2-dev autoconf automake bash bison \
bzip2 diffutils file flex m4 g++ gawk groff-base libncurses5-dev libtool libslang2 make patch perl pkg-config shtool \
subversion tar texinfo zlib1g zlib1g-dev git gettext libexpat1-dev libssl-dev cvs gperf unzip \
python libxml-parser-perl gcc-multilib gconf-editor libxml2-dev g++-multilib gitk libncurses5 mtd-utils \
libncurses5-dev libvorbis-dev git autopoint autogen sed build-essential intltool libglib2.0-dev \
@bplasmeijer
bplasmeijer / docker-compose.yml
Created October 27, 2020 22:06 — forked from Aghassi/docker-compose.yml
LinuxServer Docker Compose: Plex, Sonarr, Radarr, NZBGet, Let's Encrypt, Time Machine
version: '2'
services:
plex:
image: linuxserver/plex
container_name: plex
volumes:
- /path/to/plex/config:/config
- /path/to/plex/Movies:/data/movies
- /path/to/plex/Shows:/data/tvshows
- /path/to/plex/transcode:/data/transcode
@bplasmeijer
bplasmeijer / README.md
Created September 15, 2021 19:05 — forked from djfdyuruiry/README.md
WSL 2 - Enabling systemd

Enable systemd in WSL 2

This guide will enable systemd to run as normal under WSL 2. This will enable services like microk8s, docker and many more to just work during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.

  • To enable systemd under WSL we require a tool called systemd-genie

  • Copy the contents of install-sg.sh to a new file /tmp/install-sg.sh:

    cd /tmp
@bplasmeijer
bplasmeijer / simple-network-scan.ps1
Last active July 25, 2022 20:10 — forked from poshcodebear/simple-network-scan.ps1
Simple Network Host Scan in PowerShell
$subnet = '10.224.0'
(1..254) | foreach {
$ip = "$subnet.$_"
$props = @{
'IP' = $ip ;
'Name' = (Resolve-DnsName $ip -ErrorAction SilentlyContinue | select -ExpandProperty NameHost) ;
'Response' = (Test-Connection $ip -Quiet -Count 1)
}
$obj = New-Object -TypeName psobject -Property $props
Write-Output $obj
#!/usr/bin/env bash
set -e
DEFAULT_BIN_DIR="/usr/local/bin"
BIN_DIR=${1:-"${DEFAULT_BIN_DIR}"}
GITHUB_REPO="fluxcd/flux2"
# Helper functions for logs
info() {
echo '[INFO] ' "$@"
extraScrapeConfigs: |
- job_name: opencost
scrape_interval: 1m
scrape_timeout: 10s
metrics_path: /metrics
scheme: http
static_configs:
- targets: ['opencost.opencost-exporter:9003']