Skip to content

Instantly share code, notes, and snippets.

View zandercodes's full-sized avatar

Julian Zander zandercodes

View GitHub Profile
@zandercodes
zandercodes / reduce-binary-size.md
Created November 29, 2022 10:25
Golang Reduce Binary Size

Initial state

$ go version

go version go1.13 linux/amd64

$ mkdir /tmp/helloworld; cd /tmp/helloworld;
$ cat > main.go <<EOF
package main
@zandercodes
zandercodes / hack-wordpress-admin-without-password.md
Created November 29, 2024 10:10 — forked from milanchymcak/hack-wordpress-admin-without-password.md
"Hack" into WordPress admin area without password

Regain access to WordPress installation without password or even username

Create a file anywhere in your WordPress installation and access the file directly through your browser. You will be redirected to the WP admin area without even having a password or username.

Please, delete the following lines from your production site after usage. Your website can be easily hacked or exploited with the following script.

/** Set up WordPress environment */
@zandercodes
zandercodes / Ensure script runs under PowerShell 7.5 or higher.ps1
Last active July 10, 2025 13:30
Ensure script runs under PowerShell 7.5 or higher
# Ensure script runs under PowerShell 7.5 or higher
if ($PSVersionTable.PSVersion -lt [Version]"7.5") {
$pwshExe = Get-Command pwsh.exe -ErrorAction SilentlyContinue
if ($pwshExe -and $pwshExe.Version -ge [Version]"7.5") {
Write-Host "Restarting script with PowerShell 7.5 or higher..."
& $pwshExe.Source -File $MyInvocation.MyCommand.Path @args
exit
} else {
Write-Host "This script requires PowerShell 7.5 or higher."
exit 1