Skip to content

Instantly share code, notes, and snippets.

View peternied's full-sized avatar

Peter Nied peternied

  • Amazon.com
  • Austin, TX
View GitHub Profile
@peternied
peternied / README.md
Created April 17, 2025 17:51
Running dev server as a service

Have a UX prototype that you are working on that you'd like to share with others quickly?

These scripts and service pull the latest changes from a GitHub repo, refresh and host that service so its easy to interact with.

**⚠️ Security **
As always be careful what you are exposing, as vunerabilties in your hosting process are exposed by openning up a port to the internet - best to minimize the exposed surface area with firewall rules and other restrictions

Instructions

  1. Deploy all of the files in there respective locations
@peternied
peternied / benchmark.log
Created April 9, 2025 17:26
[BUG] ES5 Geonames large_terms does not honor connection string #605
2025-04-09 17:10:48,112 -not-actor-/PID:1907 osbenchmark.benchmark INFO OS [uname_result(system='Linux', node='ma-migration-console-675c4bdf5c-8tf7w', release='6.8.0-1024-aws', version='#26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025', machine='x86_64')]
2025-04-09 17:10:48,112 -not-actor-/PID:1907 osbenchmark.benchmark INFO Python [namespace(name='cpython', cache_tag='cpython-311', version=sys.version_info(major=3, minor=11, micro=11, releaselevel='final', serial=0), hexversion=51055600, _multiarch='x86_64-linux-gnu')]
2025-04-09 17:10:48,113 -not-actor-/PID:1907 osbenchmark.benchmark INFO Benchmark version [1.8.0]
2025-04-09 17:10:48,113 -not-actor-/PID:1907 osbenchmark.utils.net INFO Connecting directly to the Internet (no proxy support).
2025-04-09 17:10:48,137 -not-actor-/PID:1907 osbenchmark.benchmark INFO Detected a working Internet connection.
2025-04-09 17:10:48,138 -not-actor-/PID:1907 osbenchmark.benchmark INFO Killing running Benchmark processes
2025-04-09 17:10:48,139 -not-actor-/PID:1907 osb
{
"Description": "(SO0290) - The AWS CloudFormation template for deployment of the migration-assistant-for-amazon-opensearch-service. Version 2.0.0",
"AWSTemplateFormatVersion": "2010-09-09",
"Metadata": {
"AWS::CloudFormation::Interface": {
"ParameterGroups": [
{
"Label": {
"default": "Migration Assistant Features"
},
@peternied
peternied / opensearch_maintainer_v_emeritus.py
Last active April 12, 2024 20:25
For the OpenSearch repository determine which maintainers are likely to be Emeritus
import requests
import time
# List of GitHub IDs for the project maintainers
github_ids = [
"abbashus", "anasalkouz", "andrross", "reta", "Bukhtawar", "CEHENKLE", "dbwiddis", "dblock", "gbbafna", "setiah",
"kotwanikunal", "mch2", "msfroh", "nknize", "owaiskazi19", "peternied", "adnapibar", "Rishikesh1159", "ryanbogan",
"sachinpkale", "saratvemulapalli", "shwetathareja", "sohami", "dreamer-89", "tlfeng", "VachaShah"
]
@peternied
peternied / weekly_metrics.csv
Last active February 27, 2024 22:27
OpenSearch Pull request business days to merge - weekly
created_at number business_days_to_merge number_of_commenters
2022-08-21 00:00:00+00:00 24 10.5625 2.9583333333333335
2022-08-28 00:00:00+00:00 29 5.78125 2.896551724137931
2022-09-04 00:00:00+00:00 62 3.263157894736842 2.967741935483871
2022-09-11 00:00:00+00:00 56 2.286111111111111 2.732142857142857
2022-09-18 00:00:00+00:00 24 3.0197368421052633 2.625
2022-09-25 00:00:00+00:00 26 8.070652173913043 3.3076923076923075
2022-10-02 00:00:00+00:00 48 7.128289473684211 2.6875
2022-10-09 00:00:00+00:00 45 2.4558823529411766 2.7555555555555555
2022-10-16 00:00:00+00:00 53 17.60054347826087 3.641509433962264
@peternied
peternied / RemoveFlaggingDevice.ps1
Created April 16, 2023 21:37
Removes a device that has a port reset failure that might be causing the reset of the usb stack
foreach ($dev in Get-PnpDevice -FriendlyName '*Port Reset Failed*') {
pnputil /remove-device $dev.InstanceId
}
@peternied
peternied / SetOfContainsRuntime.md
Created March 24, 2023 20:23
[ChatGPT] Determine the runtime complexity of Set.of() implementation for contains()

Peter Nied What is the runtime of a contains call on java's Set.of() collection?

The runtime of a contains call on Java's Set.of() collection is O(1) on average, assuming a well-distributed hash function for the objects being stored in the set.

This is because Set.of() returns an immutable set implementation that uses a hash table to store its elements. When contains is called on the set, the hash table is used to quickly locate the element being searched for based on its hash code. Since hash table lookup has an average time complexity of O(1), the contains operation also has an average time complexity of O(1).

However, it's important to note that the worst-case time complexity of contains on a hash set can be O(n), where n is the number of elements in the set. This can occur if there are hash collisions and all elements in the set have the same hash code, in which case the hash table degrades to a linked list and the contains operation becomes a linear search through the list. However, the probabilit

[2022-10-20T18:55:35,596][INFO ][o.o.b.MixedClusterClientYamlTestSuiteIT] [test] Stash dump on test failure [{
1> "stash" : {
1> "body" : {
1> "took" : 9,
1> "timed_out" : false,
1> "_shards" : {
1> "total" : 1,
1> "successful" : 1,
1> "skipped" : 0,
1> "failed" : 0
@peternied
peternied / docker-compose.yml
Created December 18, 2021 18:43
OpenSearch Docker Compose for Test images
version: '3'
services:
opensearch-node1:
image: opensearchstaging/opensearch:${OPENSEARCH-VERSION}
container_name: opensearch-node1
environment:
- cluster.name=opensearch-cluster
- node.name=opensearch-node1
- discovery.seed_hosts=opensearch-node1,opensearch-node2
- cluster.initial_master_nodes=opensearch-node1,opensearch-node2
@peternied
peternied / opensearch-universal-release.puml
Last active January 24, 2022 23:12
OpenSearch Universal Release Model
@startuml
skinparam backgroundColor lightgrey
title
OpenSearch Universal Release Model
end title
participant "OpenSearch-CI" as osci
box GitHub Repos
participant "OpenSearch-Build" as osb