Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am drichardson on github.
  • I am dougrichardson (https://keybase.io/dougrichardson) on keybase.
  • I have a public key whose fingerprint is BED9 80B2 9078 A6EE 3C79 4E1C 71CF 2EC5 F5D8 8D75

To claim this, I am signing this object:

@drichardson
drichardson / Out-FileUtf8NoBom.psm1
Created Oct 24, 2017 — forked from mklement0/Out-FileUtf8NoBom.ps1
PowerShell function that emulates Out-File for creating UTF-8-encoded files *without a BOM* (byte-order mark).
View Out-FileUtf8NoBom.psm1
<#
.SYNOPSIS
Outputs to a UTF-8-encoded file *without a BOM* (byte-order mark).
.DESCRIPTION
Mimics the most important aspects of Out-File:
* Input objects are sent to Out-String first.
* -Append allows you to append to an existing file, -NoClobber prevents
overwriting of an existing file.
* -Width allows you to specify the line width for the text representations
@drichardson
drichardson / reset.ps1
Last active Mar 28, 2020
Powershell Reset - Remove horizontal scrollbar and clear
View reset.ps1
function reset {
Set-Buffer-Width-To-Screen-Width
Clear-Host
}
function Set-Buffer-Width-To-Screen-Width {
$h = Get-Host
$ui = $h.UI.RawUI
$bufferSize = $ui.BufferSize
$windowSize = $ui.WindowSize
You can’t perform that action at this time.