Skip to content

Instantly share code, notes, and snippets.

View franklesniak's full-sized avatar

Frank Lesniak franklesniak

View GitHub Profile
@itod
itod / split_keyboards.md
Last active June 12, 2024 12:08
Every "split" mechanical keyboard currently being sold that I know of
@jaredhaight
jaredhaight / windows_hardening.cmd
Last active April 28, 2024 16:59 — forked from mackwage/windows_hardening.cmd
Script to perform some hardening of Windows OS.
::
::#######################################################################
::
:: Change file associations to protect against common ransomware attacks
:: Note that if you legitimately use these extensions, like .bat, you will now need to execute them manually from cmd or powershell
:: Alternatively, you can right-click on them and hit 'Run as Administrator' but ensure it's a script you want to run :)
:: ---------------------
ftype htafile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
ftype WSHFile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
ftype batfile="%SystemRoot%\system32\NOTEPAD.EXE" "%1"
@jamesfreeman959
jamesfreeman959 / keepawake.ps1
Last active July 4, 2024 14:59
A very simple PowerShell script to keep a Windows PC awake and make lync think the user is active on the keyboard
# Useful references:
#
# https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line
# https://ss64.com/vb/sendkeys.html
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell
# https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/
#
# Future enhancements - use events rather than an infinite loop
$wsh = New-Object -ComObject WScript.Shell
while (1) {
@robm82
robm82 / intuneps-x64.ps1
Created October 5, 2020 16:01
Script to run Intune Win32 PowerShell scripts in 64-bit context
# Many thanks to Z-NERD for this, and this script is a copy of the one provided on his website
# Here is a link to the original script: https://z-nerd.com/blog/2020/03/31-intune-win32-apps-powershell-script-installer/
# This is here just in case the post gets removed/lost :)
$argsString = ""
If ($ENV:PROCESSOR_ARCHITEW6432 -eq "AMD64") {
Try {
foreach($k in $MyInvocation.BoundParameters.keys)
{
switch($MyInvocation.BoundParameters[$k].GetType().Name)