Skip to content

Instantly share code, notes, and snippets.

@BradKnowles
BradKnowles / copy-to-docker-volume.sh
Created March 5, 2022 20:52 — forked from maiermic/copy-to-docker-volume.sh
Copy files to Docker volume
# Usage: copy-to-docker-volume SRC_PATH DEST_VOLUME_NAME [DEST_PATH]
copy-to-docker-volume() {
SRC_PATH=$1
DEST_VOLUME_NAME=$2
DEST_PATH="${3:-}"
# create smallest Docker image possible
echo -e 'FROM scratch\nLABEL empty=""' | docker build -t empty -
# create temporary container to be able to mount volume
CONTAINER_ID=$(docker container create -v my-volume:/data empty cmd)
# copy files to volume
@BradKnowles
BradKnowles / fast_firefox.md
Created August 8, 2024 18:53 — forked from RubenKelevra/fast_firefox.md
Make Firefox fast again
@BradKnowles
BradKnowles / BypassNRO.cmd
Created April 27, 2025 21:39
The BypassNRO batch file to allow local windows accounts.
@echo off
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE /v BypassNRO /t REG_DWORD /d 1 /f
shutdown /r /t 0

Upgrade Ansible version in AWX to latest Ansible devel

AWX 17 comes shipped with Ansible version 2.9.2*, but if you want to upgrade the Ansible version it can be some hassle. Here is how to upgrade the Ansible version for AWX :)

Note: the upgrade has to happen in the docker containers!

Login and run bash commands on the web container:

$ docker exec -it awx_web bash
@BradKnowles
BradKnowles / Get-ArgumentCompleters.ps1
Created September 4, 2025 16:35
AI Generated PowerShell function to list argument completers and their associated script blocks
function Get-ArgumentCompleters {
<#
.SYNOPSIS
Lists all registered argument completers created with Register-ArgumentCompleter.
.DESCRIPTION
This function retrieves all custom argument completers registered in the current PowerShell session
using Register-ArgumentCompleter and displays their script block contents.
.PARAMETER ShowScriptBlock