Skip to content

Instantly share code, notes, and snippets.

View greyhoundforty's full-sized avatar
🏠
Working from home

Ryan Tiffany greyhoundforty

🏠
Working from home
View GitHub Profile
@greyhoundforty
greyhoundforty / cos_access.py
Created January 12, 2026 17:11
Test COS bucket access
#!/usr/bin/env python3
"""
IBM Cloud Object Storage - HMAC Credential Bucket Access Tester
This script tests HMAC credentials to determine which buckets you can actually
read from and download files. Useful when credentials may only work for certain
buckets due to regional restrictions or permissions.
Usage:
python test_bucket_access.py
@greyhoundforty
greyhoundforty / demo-apps.md
Created July 25, 2025 14:47
OCP-Demo-Apps

Select project

oc project demodays

Create new cat app

oc new-app https://github.com/greyhoundforty/demo-cats --name=cats --strategy=docker
@greyhoundforty
greyhoundforty / wifi_qr.py
Created June 18, 2025 18:47
WiFi QR Code Generator with Click prompts
#!/usr/bin/env python3
"""
Generates QR codes for WiFi network connection
"""
import click
import qrcode
from pathlib import Path
@greyhoundforty
greyhoundforty / parser.py
Created May 7, 2025 20:21
RVtools Python Parser
import os
import pandas as pd
import glob
from typing import Dict, List, Optional, Union, Tuple
import statistics
import click
class RVToolsAnalyzer:
def __init__(self, directory_path: str = None):
"""
@greyhoundforty
greyhoundforty / k8s-worker.sh
Created April 17, 2025 18:09
RHEL 9 Kubernetes worker install script
#!/usr/bin/env bash
# Log all output
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
echo "Starting worker node installation..."
# Update package manager and add dependencies
dnf makecache
dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
@greyhoundforty
greyhoundforty / py-code-scan.md
Created April 16, 2025 10:23
Python Code Directory Scanner

Directory Scanner by Type

A Python utility for scanning directories to identify code projects by file types and Git repository status.

Features

  • Scans directories recursively to a configurable depth
  • Detects programming languages and file types based on extensions
  • Identifies Git repositories
  • Presents results in a formatted table using Rich
@greyhoundforty
greyhoundforty / ce-do-app-tls.py
Created January 15, 2025 18:01
Code Engine Automated TLS with Custom Domain
import os
import subprocess
import click
import tldextract
from datetime import datetime
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
from ibm_cloud_sdk_core import ApiException
from ibm_code_engine_sdk.code_engine_v2 import CodeEngineV2, ProjectsPager
from pydo import Client
@greyhoundforty
greyhoundforty / prefect-deploy.md
Created January 9, 2025 15:21
Prefect deployment from repo

Deployment declaration

from prefect import flow

# Source for the code to deploy (here, a GitHub repo)
SOURCE_REPO="https://github.com/greyhoundforty/prefect-flow-testing.git"

if __name__ == "__main__":
    flow.from_source(
@greyhoundforty
greyhoundforty / sm-private-ca.md
Last active October 9, 2024 13:47
Secrets Manager Private CA Setup

Create Root Certificate Authority

Create a file called root-ca.json and add the following:

{
    "config_type": "private_cert_configuration_root_ca",
    "name": "rst-cli-root-ca",
    "max_ttl": "43830h",
    "crl_expiry": "72h",
@greyhoundforty
greyhoundforty / list-resources.py
Created September 20, 2024 18:54
Dump IBM account resources to csv
import os
import csv
import click
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
from ibm_cloud_sdk_core.api_exception import ApiException
from ibm_platform_services.resource_controller_v2 import *
from ibm_platform_services import IamIdentityV1, ResourceManagerV2
from rich.console import Console
from rich.table import Table
from rich.text import Text