Skip to content

Instantly share code, notes, and snippets.

@xandersavvy
xandersavvy / MockInvokeRequest.ps1
Last active August 27, 2023 19:30
A simple automated api tester using native powershell. Read more about this on my blog: https://xandersavvy.hashnode.dev/making-a-automated-rest-api-tester-in-powershell-automating-the-api-testing
# create req.json file
# for automating make the multiple as response json array
# change the url at last / change the method at last
function Test-Api {
param(
[string]$Uri,
[string]$method,
[string]$body
)
@pallocchi
pallocchi / saveNewAttachmentsToDrive.js
Last active July 27, 2024 16:05
Automatically Save Email Attachments to Google Drive Using Google Apps Script
function saveNewAttachmentsToDrive() {
var folderId = "PUT_YOUR_FOLDER_ID_HERE"; // Replace with the ID of the destination folder in Google Drive
var searchQuery = "to:[email protected] has:attachment"; // Replace with the search query to find emails with attachments
var lastExecutionTime = getLastExecutionDate();
var threads = GmailApp.search(searchQuery + " after:" + lastExecutionTime);
var driveFolder = DriveApp.getFolderById(folderId);
for (var i = 0; i < threads.length; i++) {
var messages = threads[i].getMessages();
for (var j = 0; j < messages.length; j++) {
var message = messages[j];
@jimbrig
jimbrig / list-recycle-bin.ps1
Created July 21, 2023 23:42 — forked from r00t-3xp10it/list-recycle-bin.ps1
List\Delete the contents of the recycle bin folder.
<#
.SYNOPSIS
List\Delete the contents of the recycle bin folder.
Author: @r00t-3xp10it
Tested Under: Windows 10 (19043) x64 bits
Required Dependencies: none
Optional Dependencies: Clear-RecycleBin
PS cmdlet Dev version: v1.1.4
@jimbrig
jimbrig / GetAdmin.ps1
Created July 21, 2023 23:40 — forked from r00t-3xp10it/GetAdmin.ps1
Elevate rat client privileges from UserLand to Admin!
<#
.SYNOPSIS
Elevate sessions from UserLand to Administrator!
Author: r00t-3xp10it
Tested Under: Windows 10 (19042) x64 bits
Required Dependencies: UacMe.ps1 {auto-download}
Optional Dependencies: wevtutil {native}
PS cmdlet Dev version: v1.3.8
@badarotti
badarotti / Configuring the Web Clipper MarkDownload for a seamless workflow with Obsidian
Last active August 24, 2025 05:02
Configuring the Web Clipper MarkDownload for a seamless workflow with Obsidian
---
tags:
- software/obsidian
- software/markdownload
- what/post
- status/wip
- what/my_setup
---
> [!Notes]
@jimbrig
jimbrig / TerminalSpinner.ps1
Created June 28, 2023 21:37 — forked from mdgrs-mei/TerminalSpinner.ps1
Show spinner on the Windows Terminal tabs for every command.
$global:originalPSConsoleHostReadLine = $function:global:PSConsoleHostReadLine
$global:originalPrompt = $function:global:Prompt
$function:global:PSConsoleHostReadLine = {
$startProgressIndicator = "`e]9;4;3;50`e\"
$command = $originalPSConsoleHostReadLine.Invoke()
$startProgressIndicator | Write-Host -NoNewLine
$command
}
@mdgrs-mei
mdgrs-mei / TerminalSpinner.ps1
Created June 15, 2023 14:43
Show spinner on the Windows Terminal tabs for every command.
$global:originalPSConsoleHostReadLine = $function:global:PSConsoleHostReadLine
$global:originalPrompt = $function:global:Prompt
$function:global:PSConsoleHostReadLine = {
$startProgressIndicator = "`e]9;4;3;50`e\"
$command = $originalPSConsoleHostReadLine.Invoke()
$startProgressIndicator | Write-Host -NoNewLine
$command
}
@tsmarvin
tsmarvin / !README.MD
Last active November 25, 2023 20:54
TM-DataManipulation

TM-DataManipulation Module

Introduction

TM-DataManipulation is a PowerShell module containing classes and functions designed to handle ranges of integers, manage semantic versioning, and perform string operations.

This module is part of a suite of tools designed to improve and streamline the PowerShell commandline and scripting experience.
Check out the rest of the modules by visiting my page on the PowerShell Gallery.

Features

  • Get-ContiguousRange: Generates a range of contiguous integers.
@kierunb
kierunb / WindowsDefenderExclusionsVS2022.ps1
Created May 30, 2023 12:52
Windows Defender Exclusions VS2022
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\.dotnet') > $null
$pathExclusions.Add($userPath + '\.librarymanager') > $null
@jimbrig
jimbrig / LICENSE
Created May 9, 2023 20:40 — forked from noelbundick/LICENSE
Exclude WSL installations from Windows Defender realtime protection
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: