This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
tftp_root=/srv/tftp3/root | |
alias de='docker exec' | |
[ -d "$tftp_root" ] || mkdir -p "$tftp_root" | |
mkdir $tftp_root/isos | |
mkdir -p /mnt/iso |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by iptables-save v1.8.4 on Sun Mar 10 12:22:21 2024 | |
*mangle | |
:PREROUTING ACCEPT [277:110915] | |
:INPUT ACCEPT [202:76357] | |
:FORWARD ACCEPT [75:34558] | |
:OUTPUT ACCEPT [303:29155] | |
:POSTROUTING ACCEPT [378:63713] | |
-A FORWARD -i ens3 -o wg0 -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu | |
COMMIT | |
# Completed on Sun Mar 10 12:22:21 2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Modules Hyper-V | |
$_root = "E:\windows11" | |
$iso = ".\output\windows11.iso" | |
$vmName = 'win11' | |
$swName = 'Eth Switch' | |
$FunctionsToExport = @() | |
function Remove-TestVM { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -RunAsAdministrator | |
# launch: powershell -NoLogo -ExecutionPolicy ByPass .\Desktop\Clean-Bloatware.ps1 | |
# crap removal | |
$apps = @( | |
'Microsoft.549981C3F5F10', # cortana | |
'Microsoft.BingNews', | |
'Microsoft.GetHelp', | |
'Microsoft.Getstarted', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<#PSScriptInfo | |
.VERSION 1.0.1 | |
.GUID 4b78ccc0-dfb5-44bb-b550-1cfb0b194585 | |
.AUTHOR William Lam | |
.COMPANYNAME VMware | |
.COPYRIGHT Copyright 2020, William Lam | |
.TAGS VMware ScanCode | |
.LICENSEURI | |
.PROJECTURI https://github.com/lamw/vghetto-scripts/blob/master/powershell/VMKeystrokes.ps1 | |
.ICONURI https://blogs.vmware.com/virtualblocks/files/2018/10/PowerCLI.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
tftp_root=$1 | |
workdir=$(mktemp -d) | |
url='https://www.memtest86.com/downloads/memtest86-usb.zip' | |
command -v apt | |
if [ "_$?" = "_0" ]; then | |
apt-get update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# preparation | |
sudo apt-get install -y unzip | |
# Collect Crucial firmwares | |
t=$(mktemp -d) | |
mkdir "$t/output" | |
cd "$t" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.5' | |
networks: | |
default: | |
services: | |
nginx: | |
image: nginx:alpine | |
restart: unless-stopped | |
deploy: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
networks: | |
dmz: | |
external: true | |
name: traefik2 | |
internal: | |
internal: false | |
services: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ex: New-WorkstationCertificate -ComputerName WKS-LINUX | |
function Get-RandomPwd { | |
param([int]$Length = 20) | |
# digits + lowercase + uppercase | |
$res = -join ((48..57) + (65..90) + (97..122) | Get-Random -Count $Length | % {[char]$_}) | |
return $res | |
} |
NewerOlder