A quick, offline, alphanumeric with symbols password generator.
##
# Password Generator: min 1 lower | upper | number | symbol
##
function GeneratePassword([int] $length = 24) {
# Character sets
$lowerCase = [char[]]([char]'a'..[char]'z')I'm lazy, I use Intellij feature to find and download required JDKs and update with patches.
So Maven has a concept for toolchains, so I want something to generate a fresh ~/.m2/toolchains.xml file when there's changes.
function GenerateMavenToolchains() {
$toolchainsDocument = [xml]@'
<?xml version="1.0" encoding="UTF-8"?>
<toolchains>Crude but effective functions I use to manually manage JAVA_HOME on Windows using Powershell 7+, for those times where a project can only use a certain LTS version.
Placed in the Powershell profile file, it just attempts to find the latest version of the specific version and updates your JAVA_HOME evironment varaible.
If your path setup also relies on JAVA_HOME to add Java commands to the path, this also updates those after a refreshenv.
function jdkFinder($version) {Its got two main areas, the plugin itself in the buildscript and its UTP (Unified Test Platform) in the configurations,
they share some similar dependencies but not idential and because of this some patching might get missed at a component level.
See the build.gradle.kts for code examples.
For a long time I couldn't understand where the extra dependencies kept coming from, including duplicates of the same library but at different versions, for more details ramblings, and where I initially wrote up my findings go read this beercanx/retro-brick-game-raylib#30 (comment)
A collection of basic look up scripts to find all known vulnerabilities and any outstanding PRs from Dependabot.
Just replace '<<USERNAME>>' with your username, and gh needs to be installed and setup.
powershell
gh repo list '<<USERNAME>>' --no-archived --json nameWithOwner -q '.[].nameWithOwner' | ForEach-Object { echo "=== $_ ==="; gh api --paginate "/repos/$_/dependabot/alerts?state=open" --jq '.[] | {number, created_at, "severity": .security_vulnerability?.severity, "package": .security_vulnerability?.package?.name, "summary": .security_advisory?.summary, "url": .html_url}'; }| FROM rockylinux:9 | |
| # Install the JRE and JDK | |
| RUN dnf -y update && \ | |
| dnf -y install java-17-openjdk java-17-openjdk-devel | |
| # Create an example certificate to trust | |
| RUN openssl req -nodes -new -x509 -keyout test.baconi.co.uk.key -out test.baconi.co.uk.crt -subj '/C=GB/L=Sheffield/O=Baconi/CN=test.baconi.co.uk' && \ | |
| cp -av test.baconi.co.uk.crt /etc/pki/ca-trust/source/anchors/test.baconi.co.uk.crt |