Skip to content

Instantly share code, notes, and snippets.

@John07
Last active May 21, 2019 15:08
Show Gist options
  • Save John07/4409401 to your computer and use it in GitHub Desktop.
Save John07/4409401 to your computer and use it in GitHub Desktop.
Tiny shell script for use with Textexpander to take a (Twitter) short URL and resolve it to the full URL Add it to Textexpander as a shell script, copy the shortened URL, type your Textexpander command and then the full URL will be pasted in
#!/bin/bash
URL=$(pbpaste)
curl "$URL" --insecure --write-out %{redirect_url}
@John07
Copy link
Author

John07 commented Jan 18, 2013

Brett Terpstra has an even more elegant script here: http://brettterpstra.com/2010/08/14/is-your-url-too-short-try-our-system-free/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment