Skip to content

Instantly share code, notes, and snippets.

View p0rkjello's full-sized avatar
🏠
Working from home

Andrew Bounds p0rkjello

🏠
Working from home
View GitHub Profile
@p0rkjello
p0rkjello / esxi.xml
Last active August 29, 2015 14:27 — forked from jcpowermac/esxi.xml
<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>
@p0rkjello
p0rkjello / bobp-python.md
Created August 5, 2016 15:20 — forked from sloria/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens
@p0rkjello
p0rkjello / Script_Template.ps1
Created August 23, 2016 15:43 — forked from 9to5IT/Script_Template.ps1
PowerShell: Script Template
#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>
@p0rkjello
p0rkjello / mirrorlist.hook
Last active August 26, 2016 15:06 — forked from jaksi/mirrorlist.hook
Update pacman mirrorlist using reflector after each upgrade of pacman-mirrorlist
[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;
@p0rkjello
p0rkjello / PowerShell Accelerators
Created May 22, 2017 11:47 — forked from Staggerlee011/PowerShell Accelerators
List of available PowerShell accelerators
# List of available PowerShell Accelerators to use in functions
[psobject].Assembly.GetType('System.Management.Automation.TypeAccelerators')::Get | sort-Object -Property Value
@p0rkjello
p0rkjello / Console Title.ps1
Last active May 30, 2017 17:48
Console Title - Username
# Set the PowerShell console title as the current user. Useful when running multiple Shells as different users.
$host.ui.RawUI.WindowTitle = (whoami).toupper()
@p0rkjello
p0rkjello / Parameter Sets.ps1
Last active May 30, 2017 17:37
PowerShell parameter input by array or file.
[CmdletBinding()]
Param(
[Parameter(ParameterSetName='Name', Mandatory)]
[ValidateNotNullOrEmpty()]
[string[]]
$servers,
[Parameter(ParameterSetName='File', Mandatory)]
[ValidateNotNullOrEmpty()]
[string]
@p0rkjello
p0rkjello / Rebuild WMI MOF.bat
Created May 30, 2017 18:11
Recompile WMI MOF
for /f %s in ('dir /b *.mof *.mfl') do mofcomp %s
@p0rkjello
p0rkjello / Repair WMI.bat
Created May 30, 2017 18:39
Reregister WMI DLL's and rebuild MOF files.
:: 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