Skip to content

Instantly share code, notes, and snippets.

Import-Module PSWindowsUpdate
$cnList = @(
"computer1"
"computer2"
"computer3"
)
ForEach($cn in $cnList){
Get-WindowsUpdate -verbose -computer $cn -AcceptAll -install
}
@wwilliams
wwilliams / darkmode.ps1
Last active August 1, 2022 14:57
windows 10/11 dark mode powershell
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 -Type Dword -Force
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name SystemUsesLightTheme -Value 0 -Type Dword -Force
$appname = @(
"*3DBuilder*"
"*Appconnector*"
"*Bing*"
#"*DesktopAppInstaller*"
"*GetHelp*"
"*Getstarted*"
#"*HEVCVideoExtension*"
"*Messaging*"
"*Microsoft3DViewer*"
$appname = @(
"*3DBuilder*"
"*Appconnector*"
"*Bing*"
#"*DesktopAppInstaller*"
"*GetHelp*"
"*Getstarted*"
#"*HEVCVideoExtension*"
"*Messaging*"
"*Microsoft3DViewer*"
<?php
// Check this request has a GitLab header
function checkHeader($gitlab_header) {
if (!isset($gitlab_header)) {
throw new Exception("Can't be accessed directly.");
}
}
try { checkHeader($_SERVER['HTTP_X_GITLAB_EVENT']); }
@wwilliams
wwilliams / return.js
Created December 23, 2016 19:32
stops form submit on return but allows new line on textarea
$(document).ready(function () {
$(window).keydown(function (event) {
if (event.keyCode == 13 && event.target.nodeName != 'TEXTAREA') {
event.preventDefault();
return false;
}
});
});

Keybase proof

I hereby claim:

  • I am wwilliams on github.
  • I am wwilliams (https://keybase.io/wwilliams) on keybase.
  • I have a public key whose fingerprint is 3B32 B34F 85C5 D3BE 22FC 27FC 06F5 B81C 78B2 F3AB

To claim this, I am signing this object: