Skip to content

Instantly share code, notes, and snippets.

@hairyhenderson
hairyhenderson / d4aws_connect.sh
Last active April 19, 2019 15:09
A helper script to connect to a Docker for AWS manager node for running `docker` commands
#!/bin/bash
#
# A helper script to connect to a Docker for AWS manager node for running `docker` commands
#
# There's a few things going on here:
# 1. it figures out a swarm manager's address using the AWS API
# 2. it controls an SSH tunnel to Docker's API socket on that manager node, so that `docker` commands (such as `docker stack deploy`)
# can be directed at that node
#
# Prerequisites:
@valeriomazzeo
valeriomazzeo / xcode-icon-tag.sh
Last active January 27, 2022 10:19
Xcode Icon Version Overlay
# xcode-icon-tag.sh
# The MIT License (MIT)
#
# Copyright (c) <2015> <Valerio Mazzeo>
# Permission is hereby granted, free of charge, to any person obtaining a copy
#
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
#!/bin/bash
# This script automatically sets the version and short version string of
# an Xcode project from the Git repository containing the project.
#
# To use this script in Xcode, add the script's path to a "Run Script" build
# phase for your application target.
set -o errexit
set -o nounset