Skip to content

Instantly share code, notes, and snippets.

View Wonno's full-sized avatar
🐈

Wᴏɴɴᴏ Wonno

🐈
View GitHub Profile
@Wonno
Wonno / portainer-stack.sh
Last active September 24, 2025 17:42
Portainer: Stack creation via API and local compose.yml and stack.env
#!/usr/bin/env bash
# Create Stack in Portainer using API
#
# - compose.yml
# - stack.env
set -euo pipefail
which curl || (echo "Missing 'curl'"; exit 1)
@Wonno
Wonno / github-latest-semver-release.md
Created September 11, 2025 18:06
Retrieve greatest Semantic Release version from Github releases page

Github Semver Release Query

Purpose:
Retrieve greatest semantic version from any Github releases page.

Preconditions

@Wonno
Wonno / wsl-helpers.sh
Created July 31, 2025 13:57
WSL Helpers
#!/bin/env bash
# Change directory provided as Windows path.
# Sample:
# $ cdw "c:\windows\system32"
# $ pwd
# /mnt/c/windows/system32
function cdwin() {
if [[ -z $1 ]] ; then
echo "No path provided"; return
@Wonno
Wonno / document-scanner-resuscitation.md
Last active June 1, 2024 14:13
Revive aging document scanners

Revive aging document scanners

Problem

Many vendors of nowadays quite old image and document scanners offer no updated drivers for Windows 10 and newer. Usually only 32bit drivers are available up to WinXP, Vista and Win7. After all, since Windows 10, most of us are running 64bit systems converting those devices into bricks - unless you use Linux.

Solution: Use Linux - in our case WSL provided by Windows to resurrect those beloved scanners.

Preconditions

💡 Versions I used to run things:

@Wonno
Wonno / nexus-repo-manager-privilege-example.groovy
Created January 16, 2019 14:50 — forked from nblair/nexus-repo-manager-privilege-example.groovy
A groovy script to create Content Selectors, privileges, and roles programmatically via the Nexus Repository Manager 3 Scripting API.
import org.sonatype.nexus.common.entity.*
import org.sonatype.nexus.security.*
import org.sonatype.nexus.security.authz.*
import org.sonatype.nexus.selector.*
import com.google.common.collect.ImmutableMap
// use container.lookup to fetch internal APIs we need to use
def selectorManager = container.lookup(SelectorManager.class.name)
def securitySystem = container.lookup(SecuritySystem.class.name)
@Wonno
Wonno / msysgit2unix-socket.py
Created August 30, 2018 14:33 — forked from kevinvalk/msysgit2unix-socket.py
Updated to better survive crashes and other unexpected behavior.
#!/usr/bin/python
"""
msysGit to Unix socket proxy
============================
This small script is intended to help use msysGit sockets with the new Windows Linux Subsystem (aka Bash for Windows).
It was specifically designed to pass SSH keys from the KeeAgent module of KeePass secret management application to the
ssh utility running in the WSL (it only works with Linux sockets). However, my guess is that it will have uses for other