Skip to content

Instantly share code, notes, and snippets.

View Woznet's full-sized avatar

Woz Woznet

  • VA
  • 08:59 (UTC -05:00)
View GitHub Profile
[Options]
ThemeIndex=1
Language=en-US
Font1=Segoe UI
Font2=Consolas
Size1=11
Size2=10
Scroll=1
Interface=2
Reset=0
@Woznet
Woznet / ChangeResolution.cs
Last active March 23, 2023 18:32
Change Primary Screen Resolution type definition
using System;
using System.Runtime.InteropServices;
namespace Resolution
{
[StructLayout(LayoutKind.Sequential)]
public struct DEVMODE1
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
public string dmDeviceName;
@Woznet
Woznet / Windows command line gui access.md
Created January 4, 2023 00:57 — forked from scotgabriel/Windows command line gui access.md
Common windows functions via rundll user32 and control panel

Rundll32 commands

OS: Windows 10/8/7

Add/Remove Programs

  • RunDll32.exe shell32.dll,Control_RunDLL appwiz.cpl,,0

Content Advisor

  • RunDll32.exe msrating.dll,RatingSetupUI

Control Panel

@Woznet
Woznet / Example.com-Password-Expiration-Notifications.ps1
Created November 8, 2022 00:35 — forked from njdro/Example.com-Password-Expiration-Notifications.ps1
PowerShell Active Directory Password Expiration Email Notification
#################################################################################################################
#
# Password-Expiration-Notifications v20220823
# Highly Modified fork. https://gist.github.com/meoso/3488ef8e9c77d2beccfd921f991faa64
#
# Originally from v1.4 @ https://gallery.technet.microsoft.com/Password-Expiry-Email-177c3e27
# https://windowspoweressentials.com/2017/02/21/powershell-password-reminder-script-updated/
# https://github.com/titlerequired/public
# Robert Pearman (WSSMB MVP)
# TitleRequired.com
@Woznet
Woznet / Search my gists.md
Created April 16, 2022 13:35 — forked from santisbon/Search my gists.md
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@Woznet
Woznet / Get-SPOSiteODOpen.ps1
Created January 10, 2022 19:48
Get odopen command to sync SharePoint site
# Example
# Get-SPOSiteODOpen -UserEmail test@example.com -SiteURL 'https://example.sharepoint.com/sites/SPOSITE'
function Get-SPOSiteODOpen {
[CmdletBinding()]
param(
[Parameter(Mandatory)]
[mailaddress]$UserEmail,
[Parameter(Mandatory)]
[string]$SiteURL
@Woznet
Woznet / Read-HtmlPage.ps1
Last active May 17, 2021 18:45 — forked from angel-vladov/powershell-net.ps1
PowerShell function you can use for reading UTF8 encoded HTML pages content. The built in Invoke-WebRequest and Invoke-RestMethod fail miserably.
function Read-HtmlPage {
param(
[Parameter(Mandatory, ValueFromPipeline)]
[String] $Uri
)
# Invoke-WebRequest and Invoke-RestMethod can't work properly with UTF-8 Response so we need to do things this way.
[System.Net.HttpWebRequest]$WebRequest = [System.Net.WebRequest]::Create($Uri)
[System.Net.HttpWebResponse]$WebResponse = $WebRequest.GetResponse()
#$Reader = New-Object -TypeName IO.StreamReader -ArgumentList ($WebResponse.GetResponseStream())
$Reader = [System.IO.StreamReader]::new($WebResponse.GetResponseStream())
@Woznet
Woznet / cd_for_windows_paths.sh
Created May 14, 2021 16:55 — forked from Gordin/cd_for_windows_paths.sh
If you put this in your .bashrc/.zshrc you will be able to use cd to Windows style paths. This is probably only useful for WSL users.
cd() {
# Check if no arguments to make just typing cd<Enter> work
# Also check if the first argument starts with a - and let cd handle it
if [ $# -eq 0 ] || [[ $1 == -* ]]
then
builtin cd $@
return
fi
# If path exists, just cd into it
# (also, using $* and not $@ makes it so you don't have to escape spaces any more)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.BingWeather_8wekyb3d8bbwe]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.GetHelp_8wekyb3d8bbwe]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Getstarted_8wekyb3d8bbwe]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.Microsoft3DViewer_8wekyb3d8bbwe]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned\Microsoft.MicrosoftOfficeHub_8wekyb3d8bbwe]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion
@Woznet
Woznet / frontendDevlopmentBookmarks.md
Created May 8, 2021 21:41 — forked from dypsilon/frontendDevlopmentBookmarks.md
A badass list of frontend development resources I collected over time.