Skip to content

Instantly share code, notes, and snippets.

@gerrit-amagno
Created February 26, 2024 10:04
Show Gist options
  • Save gerrit-amagno/07d75a94fca2b6683f3ecfe8f7c9071d to your computer and use it in GitHub Desktop.
Save gerrit-amagno/07d75a94fca2b6683f3ecfe8f7c9071d 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