Skip to content

Instantly share code, notes, and snippets.

View NathanCheshire's full-sized avatar

Nate Cheshire NathanCheshire

View GitHub Profile
@NathanCheshire
NathanCheshire / gitacp.sh
Created September 8, 2025 14:47
A bash command to allow quickly committing to git with a specific message
gitacp() {
if [ $# -eq 0 ]; then
echo "Error: Commit message required"
echo "Usage: gitacp <commit message>"
return 1
fi
git add .
if ! git commit -m "$*"; then
@NathanCheshire
NathanCheshire / google_maps_legacy_style_converter.py
Created April 6, 2024 16:40
A python script to convert a legacy google static maps JSON style to the acceptable URL parameter format.
import json
import urllib.parse
import argparse
def color_to_hex(color):
"""Converts a color from #rrggbb to 0xrrggbb format."""
if color.startswith('#'):
return '0x' + color[1:]
return color