This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Kroger limits to 200 coupons, this will add the first 200.. | |
// Get all coupon cards | |
const couponCards = document.querySelectorAll('.CouponCard-wrapper'); | |
// Scroll to the bottom of the page | |
window.scrollTo(0, document.body.scrollHeight); | |
// Loop through each coupon card and clip the coupon | |
couponCards.forEach(couponCard => { | |
const clipButton = couponCard.querySelector('button[data-testid^="CouponActionButton-"]'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-Type -AssemblyName System.Web | |
function Get-TinyURL | |
{ | |
<# | |
.SYNOPSIS | |
Make a URL tiny. | |
.DESCRIPTION | |
Enter a URL to make tiny. Will encode URL's ideal for url's that have reserverd characters. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Get-CpuUsage | |
{ | |
[cmdletbinding()] | |
Param() | |
$TopCPU = Get-Process | Sort-Object CPU -desc | Select-Object -first 10 | Format-Table -AutoSize CPU, ProcessName | |
$avg = Get-WmiObject win32_processor | Measure-Object -property LoadPercentage -Average | Foreach {$_.Average} | |
if ($avg -ge 0) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## The idea and most of the code comes from. https://www.petri.com/display-memory-usage-powershell | |
Function show-MemoryUsage | |
{ | |
[cmdletbinding()] | |
Param() | |
$os = Get-Ciminstance Win32_OperatingSystem | |
$pctFree = [math]::Round(($os.FreePhysicalMemory / $os.TotalVisibleMemorySize) * 100, 2) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$wmidiskblock = { | |
Param($server = "LocalHost", $credential) | |
$Space = Get-WMIObject Win32_LogicalDisk -ComputerName $Server -filter "DriveType=3" -Credential $Credential| Select name, freespace | |
$Ram = Get-WMIObject Win32_OperatingSystem -ComputerName $Server -Credential $Credential | |
$Ram = $Ram.FreePhysicalMemory / 1024 / 1024 | |
$cpu = Get-WmiObject win32_processor -ComputerName $Server -Credential $Credential | Measure-Object -property LoadPercentage -Average | Select Average | |