Skip to content

Instantly share code, notes, and snippets.

View betterversion's full-sized avatar

Dmitriy Zhernoviy betterversion

  • Chicago
View GitHub Profile
function Get-BootTime {
$sys = Get-WmiObject win32_operatingsystem
$sys.ConvertToDateTime($sys.lastbootuptime)
}
@unacceptable
unacceptable / CPUMon.ps1
Created November 27, 2017 19:45
This will show simple top like output for CPU utilization.
While(1) {
Clear-Host;
Get-Process |
Sort-Object -Descending cpu |
Select-Object -First 15 |
Format-Table -AutoSize;
Start-Sleep 1;
}
@jchandra74
jchandra74 / PowerShell Customization.md
Last active August 20, 2025 11:13
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@sliekens
sliekens / TypeMemberLayout.xaml
Last active October 12, 2024 07:34
StyleCop Type Member Layout for Resharper 9
<?xml version="1.0" encoding="utf-16"?>
<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns">
<TypePattern DisplayName="COM interfaces" Priority="2000">
<TypePattern.Match>
<And>
<Kind Is="Interface" />
<Or>
<HasAttribute Name="System.Runtime.InteropServices.InterfaceTypeAttribute" />
<HasAttribute Name="System.Runtime.InteropServices.ComImport" />
</Or>