Skip to content

Instantly share code, notes, and snippets.

View plavjanik's full-sized avatar
💚
Panelwright

Petr Plavjaník plavjanik

💚
Panelwright
View GitHub Profile

Zowe CLI Profiles across Explorer, the MCP CLI bridge, and Endevor

Prompt used to create this document:

What are Zowe CLI profiles? How they are used in Zowe Explorer? How they are used in zowe mcp cli bridge? How they are used in Zowe CLi endevor plugin? What makes sense for the Zowe MCP to do for local and remote deployments. Do not make any changes

This document explains what Zowe CLI profiles are, how they are used by Zowe Explorer,

@plavjanik
plavjanik / mcp-reference.md
Created May 26, 2026 12:32
Zowe MCP Server Reference (v0.9.0)
@plavjanik
plavjanik / https.py
Created January 2, 2023 15:20
Example of obtaining a certificate using ACME and serving HTTPS in Python 3
"""Example HTTPS server that obtains a certificate using ACME `http-01`
challenge and auto-renews ahead of expiry.
Taken from https://gist.github.com/mmalone/12f5422b2ec68e64e9d11eae0c6ca47d
and updated for Python 3.
The workflow consists of:
(Account creation)
- Create account key
- Register account and accept TOS
@plavjanik
plavjanik / main.go
Created August 30, 2022 14:33
md5sum in Golang
package main
import (
"crypto/md5"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"regexp"
@plavjanik
plavjanik / db2_simple.py
Created August 23, 2022 13:02
Connection to Python on z/OS
import ibm_db
from ibm_db_dbi import Connection
ibm_db_conn = ibm_db.pconnect(
"",
"",
"",
)
conn = Connection(ibm_db_conn)
@plavjanik
plavjanik / log.txt
Created August 23, 2022 08:49
ibm_db==3.1.2 installation problem on z/OS
(db2-3.8b) $ python3 --version
Python 3.8.13
(db2-3.8b) $ pip3 install ibm_db==3.1.2 --no-build-isolation -v
Using pip 22.1.2 from /a/plape03/python_venv/db2-3.8b/lib/python3.8/site-packages/pip (python 3.8)
Collecting ibm_db==3.1.2
Downloading ibm_db-3.1.2.tar.gz (1.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 2.1 MB/s eta 0:00:00
Running command Preparing metadata (pyproject.toml)
oput 'DB2.DB2C10.SDSNMACS(DSNAO64C)' '/z/masserv/python38/tmp/pip-install-c0bkdl6h/ibm-db_7824cf0483e3460b9b259a1636d1c875/libdsnao64c.x'
Detected 64-bit Python
@plavjanik
plavjanik / log.txt
Created August 23, 2022 08:40
ibm_db on z/OS and Python 3.8
(db2-3.8b) $ pip3 install wheel
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel
Successfully installed wheel-0.37.1
[notice] A new release of pip available: 22.1.2 -> 22.2.2
[notice] To update, run: pip install --upgrade pip
(db2-3.8b) $ pip3 install ibm_db==3.1.1 --no-build-isolation -v
Using pip 22.1.2 from /a/plape03/python_venv/db2-3.8b/lib/python3.8/site-packages/pip (python 3.8)
@plavjanik
plavjanik / db2_connect.py
Created August 11, 2022 13:22
Connecting to Db2 for z/OS
import ibm_db
userid = ...
password = ...
ibm_db_conn = ibm_db.pconnect(
"database=DATABASE;hostname=your.system.net;port=1234;protocol=tcpip;uid=%s;pwd=%s"
% (userid, password),
"",
"",
@plavjanik
plavjanik / multiple_exit_points_in_loops.py
Created June 16, 2022 09:29
Distinguishing multiple exit points in loops
colors = ["red", "green", "blue", "orange"]
# ❌
found = False
for color in colors:
if color == "orange":
found = True
break
if not found:
@plavjanik
plavjanik / custom_sort_order.py
Created June 16, 2022 08:54
Custom sort order
colors = ["cyan", "magenta", "yellow", "black"]
def compare_length(c1, c2):
if len(c1) < len(c2):
return -1
if len(c1) > len(c2):
return 1
return 0