Skip to content

Instantly share code, notes, and snippets.

View mbarnes's full-sized avatar

Matthew Barnes mbarnes

  • Red Hat, Inc
  • Ohio
View GitHub Profile
diff --git a/vendor/github.com/microsoft/kiota-http-go/nethttp_request_adapter.go b/vendor/github.com/microsoft/kiota-http-go/nethttp_request_adapter.go
index c9b25c383..b998b0a86 100644
--- a/vendor/github.com/microsoft/kiota-http-go/nethttp_request_adapter.go
+++ b/vendor/github.com/microsoft/kiota-http-go/nethttp_request_adapter.go
@@ -268,7 +268,7 @@ func (a *NetHttpRequestAdapter) getRequestFromRequestInformation(ctx context.Con
spanForAttributes.SetAttributes(attribute.String("http.uri", uri.String()))
}
- request, err := nethttp.NewRequestWithContext(ctx, requestInfo.Method.String(), uri.String(), nil)
+ request, err := nethttp.NewRequestWithContext(ctx, requestInfo.Method.String(), uri.String()+"?whatin", nil)
@mbarnes
mbarnes / allrecipes.py
Last active July 20, 2023 13:41
AllRecipes.com saved recipe collections
#!/usr/bin/python3
#
# Retrieve saved recipe collections from AllRecipes.com.
#
# As of 2022, AllRecipes.com has become almost unusably slow and
# has dropped the capability to search among saved recipes. This
# script allows me to cache collections of recipe links offline.
#
# To avoid interactive prompts, either set environment variables
# ALLRECIPES_USERNAME and ALLRECIPES_PASSWORD or add credentials
@mbarnes
mbarnes / mamexmltojson
Created June 11, 2022 01:22
Convert "mame -listxml" output to JSON
#!/usr/bin/python3
#
# Convert "mame -listxml" output to JSON.
#
# MAME's XML output is huge, so this dumps each complete
# <machine> element to keep memory usage bounded.
#
# Output can be piped to 'jq' to query machines.
#
# e.g. Select coin-op machines with trackball controls:
@mbarnes
mbarnes / acmestores.py
Last active August 25, 2023 15:15
Acme Fresh Market Digital Coupon Clipper
#!/usr/bin/python3
#
# Clip all available digital coupons for an Acme Fresh Market account.
#
# To avoid interactive prompts, either set environment variables
# ACME_STORES_USERNAME and ACME_STORES_PASSWORD or add credentials
# to you ~/.netrc file:
#
# machine acmestores.com
# login <ACME_STORES_USERNAME>
@mbarnes
mbarnes / gianteagle.py
Last active October 14, 2023 19:34
Giant Eagle Digital Coupon Clipper
#!/usr/bin/python3
#
# Clip all available digital coupons for a Giant Eagle account.
#
# To avoid interactive prompts, either set environment variables
# GIANT_EAGLE_USERNAME and GIANT_EAGLE_PASSWORD or add credentials
# to your ~/.netrc file:
#
# machine gianteagle.com
# login <GIANT_EAGLE_USERNAME>
@mbarnes
mbarnes / marcs.py
Last active July 20, 2023 13:35
Marc's Digital Coupon Clipper
#!/usr/bin/python3
#
# Clip all available digital coupons for Marc's grocery chain.
#
# This system does not use passwords, only your phone number!
#
import html.parser
import http
import json
@mbarnes
mbarnes / unpack-ignitionconfig-files.py
Last active August 4, 2021 18:51
Unpack files in a CoreOS ignition config file
#!/usr/bin/python3
#
# Unpack files in a CoreOS ignition config file.
#
# This is a quick hack just to help examine file contents.
# Ignores file ownership and permission attributes in the ignition config.
#
# e.g. $ ./unpack-ignitionconfig-files.py bootstrap.ign
# creates ./bootstrap.ign.d directory tree with files decoded.
@mbarnes
mbarnes / download-pipeline-run.py
Last active May 27, 2021 17:32
Download a pipeline run from Azure DevOps
#!/usr/bin/python3
#
# Downloads a pipeline run from Azure DevOps (ADO).
#
# Requirements:
# 1. pip install azure-devops
# 2. Obtain a personal access token with sufficient read permissions from
# ADO and set the environment variable AZURE_DEVOPS_PERSONAL_ACCESS_TOKEN.
#
@mbarnes
mbarnes / bjs.py
Last active June 15, 2024 15:35
BJs Wholesale Club Digital Coupon Clipper
#!/usr/bin/python3
#
# Clip all available digital coupons for a BJ's membership.
#
# To avoid interactive prompts, either set environment variables
# BJS_MEMBER_EMAIL and BJS_MEMBER_PASSWORD or add credentials to
# to your ~/.netrc file:
#
# machine bjs.com
# login <BJS_MEMBER_EMAIL>