Skip to content

Instantly share code, notes, and snippets.

@kbarnes3
kbarnes3 / Get-DiskStats.ps1
Created April 7, 2024 22:28
Get-DiskStats.ps1
Get-PhysicalDisk | Sort-Object -Property DeviceId | Format-Table DeviceId,
FriendlyName,
Model,
@{Name="Size"; Expression={
$size = $_.Size;
$postfixes = @( "B", "KB", "MB", "GB", "TB", "PB" );
for ($i=0; $size -ge 1024 -and $i -lt $postfixes.Length; $i++) { $size = $size / 1024; };
return "" + [System.Math]::Round($size,2) + " " + $postfixes[$i];}},
FirmwareVersion,
SerialNumber,
@kbarnes3
kbarnes3 / settings.json
Created January 16, 2024 19:15
VS Code Settings
{
"editor.renderWhitespace": "boundary",
"vim.neovimPath": "C:/Program Files/Neovim/bin/nvim.exe",
"vim.enableNeovim": true,
"vim.useCtrlKeys": false,
"vim.normalModeKeyBindingsNonRecursive": [
{
"before": [
"<leader>", "v"

Keybase proof

I hereby claim:

  • I am kbarnes3 on github.
  • I am kbarnes3 (https://keybase.io/kbarnes3) on keybase.
  • I have a public key ASCtzqfmJdcxR-nF5enOtiFXGFpoWvbnAB7Z2adWvqDnHAo

To claim this, I am signing this object:

# This file provides a long_running decorator to indicate that a function needs a long amount of time to complete and
# the computer should not enter standby. This file currently only works on Windows and is a no-op on other platforms.
import ctypes
import platform
ES_CONTINUOUS = 0x80000000
ES_SYSTEM_REQUIRED = 0x00000001