Skip to content

Instantly share code, notes, and snippets.

def create_get_request(route, host, user_agent):
return f"GET {route} HTTP/1.1\r\nHost: {host}\r\nUser-Agent: {user_agent}\r\n\r\n"
with open("http_request", "w") as http_request_file:
http_request_file.write(create_get_request(
"/points/39.7456,-97.0892",
"api.weather.gov",
"test-agent"
))
#!/bin/bash
purge_before_date="2022-01-01"
labels_to_remove=("priority/high", "priority/medium")
for label in "${labels_to_remove[@]}"; do
echo "Removing ${label} labels:"
echo ""
issues_json=$(gh issue list -S "is:open is:issue label:${label} created:<${purge_before_date}" --limit 200 --json number,title)