Skip to content

Instantly share code, notes, and snippets.

View jonico's full-sized avatar
🚀
@ home

Johannes Nicolai jonico

🚀
@ home
View GitHub Profile
@jonico
jonico / customer-docker-setup.md
Last active June 4, 2026 10:43
Postman Data Copy Utility - Docker setup for customers (no source code required)

Postman Data Copy Utility — Docker setup

Prerequisites

  • Docker Desktop (or Docker Engine + Docker Compose v2)
  • Ports 3000 and 8000 free on your machine

Setup

1. Create a folder and open a terminal there:

@jonico
jonico / include-postman-request-response.sh
Created December 1, 2025 12:47
Include Payload / Response in Postman Tests
#!/bin/bash
# Script to run Postman collection with better response data
# This generates multiple report formats with full response bodies
COLLECTION_ID="24483733-cefed589-9c3d-4dd5-9673-0e913981403e"
ENVIRONMENT_ID="41094746-f8fd4ac6-fb62-4774-b8a5-38c42fd476e3"
TIMESTAMP=$(date +%Y-%m-%d-%H-%M-%S)
REPORT_DIR="postman-cli-reports"
@jonico
jonico / index.ts
Last active June 22, 2024 22:44
Backstage 1.25 with Postman plugin
/*
* Hi!
*
* Note that this is an EXAMPLE Backstage backend. Please check the README.
*
* Happy hacking!
*/
import { createBackend } from '@backstage/backend-defaults';
import { loggerToWinstonLogger } from '@backstage/backend-common';
@jonico
jonico / challenges.md
Last active February 15, 2025 00:51
AI Coding-Platform Evaluation

AI Coding platform evaluation

Warming up: Make some fun music with suno.ai and don't time out for longer song texts

We love to generate our custom AI music with Postman and suno.ai and this repository is a nice API wrapper around suno.ai's functionalities. However, generating longer songs takes time and makes the custom_generate API call timeout in synchronous mode. We would like to make the endpoint wait up to 60 s when hosted in Vercel. The Vercel documentation on how to configure custom timeouts in the vercel.json file can be found here: https://vercel.com/docs/functions/configuring-functions/duration. The API calls to give the 60 s timeout to are defined in src/app/api/custom_generate/route.ts. Please propose the necessary changes to the repository.

Bonus: Can you create a Postman collection that is making use of the custom_generate API endpoint to create a beautiful pop song about automated code generation, contains a Postman visualization for the resulti

@jonico
jonico / modify-examples.js
Created December 12, 2023 14:39
Duplicate Postman collection responses
var fs = require('fs'), // needed to read JSON file from disk
Collection = require('postman-collection').Collection,
Response = require('postman-collection').Response,
myCollection;
// Load a collection to memory from a JSON file on disk (say, sample-collection.json)
myCollection = new Collection(JSON.parse(fs.readFileSync('sample-collection.json').toString()));
// iterate through all requests in the collection
myCollection.forEachItem(function (item) {
@jonico
jonico / postman-issue-ops.yml
Created June 20, 2023 13:44
GitHub Action based IssueOps workflow to create Postman releases and a tag directly from a pull request by issuing a comment starting with /pm-release [<release-name>] ["release notes"]
name: Postman IssueOps commands
on:
issue_comment:
types: [created]
jobs:
prechecks:
name: Permission pre-check
if: github.event.issue.pull_request != null && (startsWith(github.event.comment.body, '/pm-release') || startsWith(github.event.comment.body, '/pm-publish'))
@jonico
jonico / Jenkinsfile
Last active September 3, 2024 00:13
Jenkinsfile showing advanced Postman CLI, portman (contract test generation) and newman integration including custom reporters and reporting status back to Postman
def checkout () {
context="continuous-integration/jenkins/"
context += isPRMergeBuild()?"pr-merge/checkout":"branch/checkout"
def scmVars = checkout scm
setBuildStatus ("${context}", 'Checking out completed', 'SUCCESS')
if (isPRMergeBuild()) {
prMergeRef = "refs/pull/${getPRNumber()}/merge"
mergeCommit=sh(returnStdout: true, script: "git show-ref ${prMergeRef} | cut -f 1 -d' '")
echo "Merge commit: ${mergeCommit}"
return [prMergeRef, mergeCommit]
@jonico
jonico / index.js
Last active September 20, 2022 11:44
How to debug PlanetScale database-js API with a proxy hooked into node-js 18's fetch API (based on undici)
import { connect } from '@planetscale/database'
import dotenv from 'dotenv'
import express from 'express'
import { ProxyAgent } from 'undici';
const agent = new ProxyAgent('http://localhost:5555');
global[Symbol.for('undici.globalDispatcher.1')] = agent;
process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0';
@jonico
jonico / README.md
Last active July 5, 2022 11:01
Docker compose files for temporal.io with external MySQL databases for temporal and temporal_visibility tables (using PlanetScale as example)

Docker compose files for temporal.io with external MySQL databases for temporal and temporal_visibility tables (using PlanetScale as example)

As the docker-compose files 👇 are using PlanetScale's MySQL-compatible Vitess database as an example, each database (temporal and temporal_internal) use different keyspaces and connection strings. Unfortunately, temporalio/auto-setup does not seem to support multiple connection strings for database creation and schema updates (using temporal-sql-tool), so the following commands would need to be run manually before starting up docker-compose:

./temporal-sql-tool --ep $TEMPORAL_PSCALE_HOSTSTRING --user $TEMPORAL_PSCALE_USER --tls  --password $TEMPORAL_PASSWORD-p 3306 --plugin mysql --db temporal setup-schema -v 0.0
./temporal-sql-tool --ep $TEMPORAL_PSCALE_HOSTSTRING --user $TEMPORAL_PSCALE_USER --tls  --password $TEMPORAL_PASSWORD-p 3306 --plugin mysql --db temporal update-schema -d ./schema/mysql/v57/temporal/versioned
./temporal
@jonico
jonico / MySQLBYOD.py
Last active July 12, 2023 21:20
Copying from one PlanetScale table to another using AWS Glue (and MySQL 8.0 JDBC driver)
import sys
from awsglue.transforms import *
from awsglue.utils import getResolvedOptions
from pyspark.context import SparkContext, SparkConf
from awsglue.context import GlueContext
from awsglue.job import Job
import time
from pyspark.sql.types import StructType, StructField, IntegerType, StringType
sc = SparkContext()