Skip to content

Instantly share code, notes, and snippets.

View michaelwoods's full-sized avatar

Michael Woods michaelwoods

View GitHub Profile
{
"commands": {
"command": [
{
"name": "cancelAlert",
"description": "Cancel a vehicle alert (honk horns/flash lights).",
"url": "https://api.gm.com/api/v1/account/vehicles/{VIN}/commands/cancelAlert",
"isPrivSessionRequired": "false"
},
{
@michaelwoods
michaelwoods / gh-rel
Created July 18, 2018 21:33
Get latest release from provided github repo
#!/usr/bin/env bash
if [ $# -eq 0 ]; then
echo "Provide org/repo as first argument."
exit
fi
REPO=$1
@michaelwoods
michaelwoods / scrum.sh
Created July 13, 2016 15:06
List last two working days of commits from git repos for scrum status.
#!/usr/bin/env bash
#place the git repo directories here, space delimited
PROJECTS=(~/Projects/foo ~/Projects/bar)
DOW=$(date +%w)
if [[ $DOW -eq 1 ]]; then #Monday
SINCE=4.days
else
SINCE=2.days
@michaelwoods
michaelwoods / prepare-commit-msg.sh
Last active July 16, 2018 15:30 — forked from bartoszmajsak/prepare-commit-msg.sh
Regex matching of JIRA story keys to prepend git commits.
#!/bin/bash
STORY_KEY=$(git symbolic-ref --short HEAD | grep -Eo '^[a-zA-Z0-9]{3,}[-_][0-9]{1,5}' | awk '{sub(/_/, "-"); print toupper($0)}')
if [ -n "$STORY_KEY" ]; then
sed -i.bak -e "1s/^/[$STORY_KEY] /" $1
fi