Skip to content

Instantly share code, notes, and snippets.

@jpbruckler
Created September 26, 2018 13:49
Show Gist options
  • Save jpbruckler/7da0d1a1781838ce229d3fdf553dec02 to your computer and use it in GitHub Desktop.
Save jpbruckler/7da0d1a1781838ce229d3fdf553dec02 to your computer and use it in GitHub Desktop.
PowerShell shrugs in your clipboard!
function Get-Shrug
{
<#
.SYNOPSIS
Copies a shrug emoji to your clipboard.
.DESCRIPTION
Copies the shrug emoji to the clipboard. If this function is saved in a
file (like your $profile), the text encoding of that file needs to be
set to UTF-8 with BOM in order for all the characters to be displayed
propertly.
.NOTES
See this StackOverflow post for more information than you ever wanted
to know about character encoding in PowerShell.
https://stackoverflow.com/a/48029600
#>
$OutputEncoding = [console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding
$shrug = '¯\_(ツ)_/¯'
Set-Clipboard -Value $shrug
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment