Skip to content

Instantly share code, notes, and snippets.

@manualbashing
manualbashing / 1_troubleshooting.md
Last active September 23, 2022 14:22
[racadm Cheatsheet] for administration of Dell iDRAC with #racadm

Network Troubleshooting

Ping from iDRAC:

racadm ping <ip>

View Logs

@manualbashing
manualbashing / gist.md
Created November 7, 2019 07:16
[Download latest raw from gist]

Raw gist URLs follow the pattern below:

https://gist.githubusercontent.com/[gist username]/[gist ID]/raw/[gist commit ID]/[file name]

To view the latest version, simply remove the [gist commit ID] part:

https://gist.githubusercontent.com/[gist username]/[gist ID]/raw/[file name]
@manualbashing
manualbashing / 0_Readme.md
Last active November 7, 2019 07:28
[Dynamically set the console host theme] in #PowerShell

This is mostly an experiment with dynamic parameters in PowerShell.

It wraps around ColorTool.exe:

choco install colortool

and uses console themes from this repository:

@manualbashing
manualbashing / Invoke-GridHistory.ps1
Created November 7, 2019 07:38
[Graphical history] using ogv in #PowerShell
function Invoke-GridHistory {
[Alias('ghistory')]
param(
$Filter = '*'
)
Get-History |
Where-Object CommandLine -Like $Filter |
Select-Object -ExpandProperty CommandLine |
Out-GridView -OutputMode Single |
@manualbashing
manualbashing / PowerShell Customization.md
Last active November 21, 2019 08:36 — forked from jchandra74/PowerShell Customization.md
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.

@manualbashing
manualbashing / restart_all_hosts.ps1
Created November 7, 2019 15:36
[Restart all Hosts in Cluster without DRS] Restart all #ESXi Hosts in a cluster
$VerbosePreference = 'Continue'
foreach ($vmh in (Get-VmHost))
{
Write-Verbose "Move all VMs from $vm to $targetHost"
$vmh | Get-VM | Move-VM -Destination $targetVMHost
Write-Verbose "Send $vmh to Maintenance mode"
$vmh | Set-VMHost -State Maintenance
Write-Verbose "Restart $vmh"
@manualbashing
manualbashing / exit_gui.md
Created November 7, 2019 19:44
[AHK Gui Cheatsheet] #ahk

Use this in a function to exit on ESC, without overriding the ESC key globally.

GuiEscape:
    Gui, Destroy
return
@manualbashing
manualbashing / push_back_setup.md
Last active November 7, 2019 22:31
[Push back to source repository] from #AzureDevOps pipeline

Build pipeline

Use the following steps in your pipeline (Windows build agent):

steps:
- checkout: self
  clean: true
  persistCredentials: true
 
@manualbashing
manualbashing / greenshot.md
Last active November 7, 2019 22:34
[Use Greenshot to take screenshots for gists]
  1. Take a screenshot and save it to clipboard
  2. Open a gist and paste the screenshot to the commentary field of a markdown gist
  3. Take the resulting markdown expression and paste it back into your gist.

image