Skip to content

Instantly share code, notes, and snippets.

View james-hinton's full-sized avatar
😎

James Hinton james-hinton

😎
View GitHub Profile
@james-hinton
james-hinton / Aurora-Explorer.md
Last active May 12, 2024 10:47
Aurora Explorer

Aurora Explorer

James Hinton's Aurora Explorer is a web platform that uses Kubernetes Helm, AWS, and EOxServer to deliver real-time and historical data on the Aurora Borealis via OGC standards for visualisation.

Technologies Used

Explore the code repositories to see how Aurora Explorer was built. Click on the badges to view each repository:

@james-hinton
james-hinton / ToggleDisplayMode.ps1
Last active March 20, 2024 17:07
A PowerShell script for quickly toggling between duplicate and extend display modes on Windows
# Path to custom registry key for tracking display mode
$registryPath = "HKCU:\Software\CustomDisplayToggle"
$keyName = "DisplayMode"
if (-not (Test-Path $registryPath)) {
New-Item -Path $registryPath -Force | Out-Null
New-ItemProperty -Path $registryPath -Name $keyName -Value "Duplicate" -PropertyType String -Force | Out-Null
}
Start-Sleep -Seconds 1
@james-hinton
james-hinton / check_cog_geotiff.py
Created April 25, 2023 12:06
Check Cloud Optimized GeoTIFF
import pathlib
import rasterio
from rasterio.env import GDALVersion
import click
from typing import Union, Optional, Tuple, List, Dict, Any
def is_cog(
src_path: Union[str, pathlib.PurePath],
strict: bool = False,
config: Optional[Dict] = None,
@james-hinton
james-hinton / k8s_logs.sh
Created March 16, 2023 10:38
A shell script to fetch logs for Kubernetes pods based on the beginning of their names and an optional namespace.
#!/bin/bash
if [ "$#" -lt 1 ] || [ "$#" -gt 2 ]; then
echo "Usage: $0 <container-name-start> [namespace]"
exit 1
fi
container_name_start="$1"
namespace_flag=""
@james-hinton
james-hinton / get-all-helm-values.py
Created December 6, 2022 11:14
Download all helm values from Kubernetes cluster
# Script to download all helm values from helm-enabled kubernetes cluster
# If on remote cluster download this using scp <USER>@<IP>:<PATH>/helm-values.zip helm-values.zip
import subprocess
import zipfile
import os
def get_all_helm_values():
helm_list = subprocess.check_output(["helm", "list", "--all-namespaces"])
helm_list = helm_list.decode("utf-8")