A "Best of the Best Practices" (BOBP) guide to developing in Python.
- "Build tools for others that you want to be built for you." - Kenneth Reitz
- "Simplicity is alway better than functionality." - Pieter Hintjens
<domain type='kvm' id='12'> | |
<name>esxi</name> | |
<memory unit='KiB'>4194304</memory> | |
<currentMemory unit='KiB'>4194304</currentMemory> | |
<vcpu placement='static'>2</vcpu> | |
<resource> | |
<partition>/machine</partition> | |
</resource> | |
<os> | |
<type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type> |
#requires -version 2 | |
<# | |
.SYNOPSIS | |
<Overview of script> | |
.DESCRIPTION | |
<Brief description of script> | |
.PARAMETER <Parameter_Name> | |
<Brief description of parameter input required. Repeat this attribute if required> |
[Trigger] | |
Type = Package | |
Operation = Install | |
Operation = Upgrade | |
Target = pacman-mirrorlist | |
[Action] | |
Description = Updating mirrorlist... | |
When = PostTransaction | |
Depends = reflector |
[Desktop Entry] | |
Name=Steam | |
Comment=Application for managing and playing games on Steam | |
Exec=env LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1 /usr/$LIB/libgpg-error.so' /usr/bin/steam %U | |
Icon=steam | |
Terminal=false | |
Type=Application | |
Categories=Network;FileTransfer;Game; | |
MimeType=x-scheme-handler/steam; | |
Actions=Store;Community;Library;Servers;Screenshots;News;Settings;BigPicture;Friends; |
# List of available PowerShell Accelerators to use in functions | |
[psobject].Assembly.GetType('System.Management.Automation.TypeAccelerators')::Get | sort-Object -Property Value |
# Set the PowerShell console title as the current user. Useful when running multiple Shells as different users. | |
$host.ui.RawUI.WindowTitle = (whoami).toupper() |
[CmdletBinding()] | |
Param( | |
[Parameter(ParameterSetName='Name', Mandatory)] | |
[ValidateNotNullOrEmpty()] | |
[string[]] | |
$servers, | |
[Parameter(ParameterSetName='File', Mandatory)] | |
[ValidateNotNullOrEmpty()] | |
[string] |
for /f %s in ('dir /b *.mof *.mfl') do mofcomp %s |
:: https://blogs.technet.microsoft.com/askperf/2009/04/13/wmi-rebuilding-the-wmi-repository/ | |
sc config winmgmt start= disabled | |
net stop winmgmt /y | |
%systemdrive% | |
cd %windir%\system32\wbem | |
for /f %%s in ('dir /b *.dll') do regsvr32 /s %%s | |
wmiprvse /regserver | |
winmgmt /regserver | |
sc config winmgmt start= auto |