Skip to content

Instantly share code, notes, and snippets.

View swerveshot's full-sized avatar

Rudolf Kleijwegt swerveshot

View GitHub Profile
<#
.SYNOPSIS
Adapted version of the Connect-CIServer Cmdlet to connect to VMware Cloud Director
with an API Access Token
.DESCRIPTION
Adapted version of the Connect-CIServer Cmdlet to connect to VMware Cloud Director
with an API Access Token.
This Cmdlet 'wraps' the original Connect-CIServer and simplifies the REST API calls needed to
'rehydrate' a PowerCLI Session from an API Access Token Generated in VCD.
@spy86
spy86 / docker-compose.yml
Created March 31, 2020 18:49
Reverse proxy in Traefik + docker with subdirectories.
version: '3.7'
services:
traefik:
image: traefik:v2.2.0
ports:
- "${FRONT_HTTP_PORT:-80}:80"
# - "${TRAEFIK_PORT:-8080}:8080"
environment:
# - TRAEFIK_LOG_LEVEL=DEBUG
- TRAEFIK_PROVIDERS_DOCKER_EXPOSEDBYDEFAULT=false
@kekru
kekru / traefik-redirect-path.md
Last active November 22, 2024 05:09
Traefik redirect / (root) to sub path with Docker labels

Traefik: redirect base or root path to a subpath

This is tested with Traefik 1.7

This is how to redirect the root or base path to a sub path in Traefik using Docker labels:
Goals

  • https://example.com -> https://example.com/abc/xyz/
  • https://example.com/ -> https://example.com/abc/xyz/
  • https://example.com/something -> no redirect
@drmalex07
drmalex07 / README-fail2ban-openvpn.md
Created March 3, 2019 13:34
Block unauthorized requests to OpenVPN using fail2ban. #openvpn #fail2ban

Block unauthorized requests to OpenVPN using fail2ban.

The following is based on https://stefan.angrick.me/block-unauthorized-openvpn-logins-using-fail2ban.

1. Create filter confifuration

Add a filter configuration under /etc/fail2ban/filter.d/openvpn.conf. The contents would be something like (regular expressions may need adjustments):

[INCLUDES]
before = common.conf
@carlosedp
carlosedp / docker-compose.yml
Created January 19, 2018 14:35
docker-compose.yml - Traefik and Portainer
version: '2'
networks:
monitoring:
services:
traefik:
image: traefik:v1.5.0-rc5
restart: always
@anthonyspiteri
anthonyspiteri / cassandra.sh
Last active September 13, 2023 04:06 — forked from ixaxaar/cassandra.sh
Simple bash script to install cassandra cluster
#!/usr/bin/env bash
# A script to install cassandra modified by Anthony Spiteri for vCloud Director Metric Database installs
# ADD SEE NODES HERE - FOR SUPPORTED INSTALL 4 NODES WITH 2 SEEDS REQUIRED
SEEDS[0]='172.17.0.10'
#SEEDS[1]=172.17.0.11'
#SEEDS[2]=172.17.0.12'
#SEEDS[3]=172.17.0.13'
@krnese
krnese / vmCondition
Last active December 8, 2021 04:54
This ARM template shows how to use conditions and logical/comparison functions to dynamically create windows/linux for prod/non-prod
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"vmNamePrefix": {
"type": "string",
"defaultValue": "VM",
"metadata": {
"description": "Assing a prefix for the VM you will create."
}
@oncipriani
oncipriani / Autounattend.xml
Last active May 7, 2020 22:01
Windows unattended instalation file.
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<servicing>
<package action="remove">
<assemblyIdentity name="Microsoft-Windows-QuickAssist-Package" version="10.0.16299.15" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="" />
</package>
<package action="remove">
<assemblyIdentity name="Microsoft-Windows-MediaPlayer-Package" version="10.0.16299.15" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="" />
</package>
<package action="configure">
@raspberrytipsnl
raspberrytipsnl / ws2801ledstrip.py
Created March 19, 2017 13:43
WS2801 ledstrip demo
# https://raspberrytips.nl/ws2801-ledstrip/
# Simple demo script for a WS2801/SPI-like addressable RGB LED lightstrip.
import time
import RPi.GPIO as GPIO
import Adafruit_WS2801
import Adafruit_GPIO.SPI as SPI
# Configure the count of pixels:
PIXEL_COUNT = 32
@oskar456
oskar456 / md4pass.sh
Created October 7, 2016 09:48
MSCHAPv2 hash generator one-liner
python -c 'import getpass,hashlib; print(hashlib.new("md4",getpass.getpass().encode("utf-16le")).hexdigest())'