Skip to content

Instantly share code, notes, and snippets.

@f4n0
f4n0 / Find-OrphanDockerLayers.ps1
Created February 20, 2025 13:40 — forked from olljanat/Find-OrphanDockerLayers.ps1
Find Windows containers orphan layers
param (
[switch]$RenameOrphanLayers
)
If ($RenameOrphanLayers) {
Write-Warning "$($env:COMPUTERNAME) -RenameOrphanLayers option enabled, will rename all orphan layers"
}
# Get known layers on Docker images
[array]$ImageDetails += docker images -q | ForEach { docker inspect $_ | ConvertFrom-Json }
$m = '[DllImport("user32.dll", EntryPoint = "SystemParametersInfo")] public static extern bool SystemParametersInfo(uint uiAction, uint uiParam, uint pvParam, uint fWinIni);';
$U = Add-Type -MemberDefinition $m -Name "User32Set" -Namespace Win32Functions -PassThru;
$U::SystemParametersInfo(0x0071, 0, 1, 0) | Out-Null;
Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name MouseSensitivity -Value 1;
$U::SystemParametersInfo(0x0069, 100, 0, 0x01) | Out-Null;
Set-ItemProperty -Path "HKCU:\Control Panel\Mouse" -Name WheelScrollLines -Value 100;
@f4n0
f4n0 / DriveIcons.css
Created November 8, 2022 16:48
the google file icons by mime type as css background url
This file has been truncated, but you can view the full file.
@f4n0
f4n0 / js.js
Created December 1, 2021 08:39
'use strict'
const msg = 'This file is loaded from bl4de.tech domain and executed in context of ' + document.domain;
console.log(msg)
window['alert'](msg)