Skip to content

Instantly share code, notes, and snippets.

View nobesnickr's full-sized avatar

Phillip McCaffrey nobesnickr

  • Gilbert, Arizona
View GitHub Profile
@nobesnickr
nobesnickr / Remove-ACL.ps1
Created February 10, 2021 21:47
Recursively Reset ACL via PowerShell - (Remove All, Add New w/ Full Control)
Function Remove-ACL {
[CmdletBinding(SupportsShouldProcess=$True)]
Param(
[parameter(Mandatory=$true,ValueFromPipeline=$true,Position=0)]
[ValidateNotNullOrEmpty()]
[ValidateScript({Test-Path $_ -PathType Container})]
[String[]]$Folder,
[Switch]$Recurse,
[Switch]$ChangeOwner,
[String[]]$UserId,
@nobesnickr
nobesnickr / Sandbox.ps1
Last active February 19, 2021 21:18
PowerShell Commands to Reserve IP Address on Windows Network
function Sandbox {
param(
[Parameter(Mandatory)]
[string]$Name
)
$yes = New-Object System.Management.Automation.Host.ChoiceDescription '&Yes', 'Allows setting a delay'
$no = New-Object System.Management.Automation.Host.ChoiceDescription '&No', 'Does not allow setting a delay'
$options = [System.Management.Automation.Host.ChoiceDescription[]]($yes, $no)
$result = $host.ui.PromptForChoice('Set Delay?', 'Would you like to set a delay?', $options, 0)
@nobesnickr
nobesnickr / UnsaveLinkedSavedJobs.js
Last active January 14, 2022 18:29
Unsave "Saved Jobs" on LinkedIn
// Navigate to https://www.linkedin.com/my-items/saved-jobs/
// Open the browser console, paste the code below into it, press enter to execute the code, then reload the page
var fetchJobCount = function(){
let xRs = $x('//a[@data-control-name="myitems_all_savedjobs"]/div[2]');
jc = parseInt(xRs[0].innerText);
if ( isNaN(jc) ) { alert('Could not determine "My Jobs" count. Ensure you are running from the "My Jobs" page (url below) \n\nhttps://www.linkedin.com/my-items/saved-jobs/') };
console.log('Total Job Count: ' + jc);
@nobesnickr
nobesnickr / WindowsTremendousFilesDeleter.cmd
Last active August 14, 2021 03:34
Windows Batch Script to Delete Ridiculous Amount Of Files
:: Created by Phil McCaffrey <[email protected]>
:: For updates, usage instructions and more... @see https://gist.github.com/nobesnickr/b2f0af33f2ea8ceaa21cffaa1086e0e9
@echo off
cls
TITLE Windows Massive Files Deleter
setlocal EnableExtensions EnableDelayedExpansion
:: Establish Variables
set _performDelete="false"