Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gerrited/cd24bbd295dbb8c6209993f77e4e9e0d to your computer and use it in GitHub Desktop.
Save gerrited/cd24bbd295dbb8c6209993f77e4e9e0d to your computer and use it in GitHub Desktop.
create a short link with is.gd and copy it to the clipboard - powershell function for notepad $profile - add quotes for the url parameter when calling the function
function short {
param([string]$url)
$escapedUrl = [URI]::EscapeUriString($url)
$shorturl = curl "https://is.gd/create.php?format=simple&url=$escapedUrl"
Write-Output $shorturl
Set-Clipboard $shorturl
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment