Skip to content

Instantly share code, notes, and snippets.

View ianmaddox's full-sized avatar
:shipit:
Currently writing a GitHub status line.

Ian Maddox ianmaddox

:shipit:
Currently writing a GitHub status line.
View GitHub Profile
@ianmaddox
ianmaddox / setsecret.sh
Last active October 29, 2021 23:06
GCP Secret Manager setsecret.sh
#!/usr/bin/env bash
PROJECTID=sm-demo-330516
if [ -z "$1" ]; then
echo "Usage:"
echo " echo SECRET | storepw SECRET_NAME"
exit
fi
SEC="$(hostname)-$1"
gcloud beta secrets create $SEC --project=$PROJECTID --replication-policy automatic --data-file=-
@ianmaddox
ianmaddox / getsecret.sh
Last active October 29, 2021 23:05
GCP Secret Manager getsecret.sh
#!/usr/bin/env bash
PROJECTID=sm-demo-330516
if [ -z "$1" ]; then
echo "Usage:"
echo " $0 SECRET_NAME"
exit
fi
SEC="$(hostname)-$1"
gcloud beta secrets versions access latest --project=$PROJECTID --secret=$SEC | xargs
@ianmaddox
ianmaddox / .tmux.conf
Last active September 22, 2024 17:06
# Fix the control character
unbind C-b
set -g prefix C-a
set -g mouse on
unbind '"'
unbind %
unbind |
# Enable pane border status to display labels at the top
write_files:
- url: http://deploy-files.s3-website-us-west-2.amazonaws.com/tmux.conf
owner: root:root
path: /etc/tmux.conf
permissions: '0644'
@ianmaddox
ianmaddox / boxoh_example.php
Created May 28, 2014 00:39
Boxoh.com Barebones API Example
<html><body onload="bomap_initialize()" onunload="GUnload()">
<?php
// Obtain Boxoh key from here: http://www.boxoh.com/api/signup/
$boxohApiKey = 'INSERT_BOXOH_KEY_HERE';
// Obtain key from here: https://developers.google.com/maps/documentation/javascript/tutorial#api_key
$googleApiKey = 'INSERT_GOOGLE_KEY_HERE';
// Grab the tracking number off the querystring 't' parameter