Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#! /usr/bin/env bash
# Usage: git-io URL [CODE]
# Turns a URL
# into a URL
SHORT_URL=$(curl -si -F "url=${URL}" ${CODE:+-F "code=${CODE}"} | grep 'Location:' | sed 's/Location: //')
echo "Copied URL to clipboard."
echo "${SHORT_URL}" | pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.