Skip to content

Instantly share code, notes, and snippets.

<#
.SYNOPSIS
Sets custom NTFS permissions on a desginated folder.
.DESCRIPTION
Resets NTFS permissions on the target folder. Then grants\removes permissions based on User selection.
.PARAMETER Folder
Target folder to set NTFS permissions on.
.PARAMETER Owner
Designated owner of target folder once function is complete. For domain user, must be entered as 'domain\username'.
.PARAMETER GrantACL
@HurtzDonut
HurtzDonut / Remove-NotesDocuments.ps1
Last active April 27, 2018 14:33
Searches for and removes Lotus Notes documents older than a specified date or larger than a specified size.
<#
.SYNOPSIS
Searches for and removes Notes documents older than a specified date or larger than a specified size.
.DESCRIPTION
Connects to Users Notes Database through COM to search for and delete files older than a specified date, or files larger than a specified size.
.PARAMETER FolderName
Specifies which folder(s) to look through.
.PARAMETER Days
Defines the maximum age for documents. Any documents older than this date will be removed. Must be >= 1.
.PARAMETER LotusServer
<#
.SYNOPSIS
This Function is designed to RickRoll a specified target(s).
.DESCRIPTION
This Function will RickRoll a specified target(s) by doing the following:
1. Connect to the specified remote computer(s)
2. Use Get-CimInstance to return the logged on user
3. Create a file containing:
a. The RickRoll expression to be run
b. Code to remove teh script after run
@HurtzDonut
HurtzDonut / settings.jsonc
Last active January 4, 2022 15:50
Settings for VS Code
// Place your settings in this file to overwrite the default settings
{
//#region Editor
//#region Cursor
// Cursor blink type
"editor.cursorBlinking": "expand",
// Cursor appearance
"editor.cursorStyle": "line-thin",
// Modifier key for adding multiple cursor entries
"editor.multiCursorModifier": "ctrlCmd",
<#
.SYNOPSIS
Generates a workout routine based on a string.
.PARAMETER String
The string to base the workout routine on.
.EXAMPLE
PS C:\> ConvertTo-Workout -String 'Cabbage Corp'
Name Value
---- -----
<?xml version="1.0" encoding="UTF-8" ?>
<NotepadPlus>
<LexerStyles>
<LexerType name="autoit" desc="autoIt" ext="">
<WordsStyle name="DEFAULT" styleID="0" fgColor="F8F8F2" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
<WordsStyle name="COMMENT LINE" styleID="1" fgColor="75715E" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
<WordsStyle name="COMMENT" styleID="2" fgColor="75715E" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
<WordsStyle name="NUMBER" styleID="3" fgColor="AE81FF" bgColor="272822" fontName="" fontStyle="0" fontSize="10" />
<WordsStyle name="FUNCTION" styleID="4" fgColor="66D9EF" bgColor="272822" fontName="" fontStyle="0" fontSize="10" keywordClass="instre2" />
<WordsStyle name="INSTRUCTION WORD" styleID="5" fgColor="66D9EF" bgColor="272822" fontName="" fontStyle="0" fontSize="10" keywordClass="instre1" />
@HurtzDonut
HurtzDonut / contextMenu.xml
Created May 18, 2022 17:52
Notepad++ Custom Context Menu
<?xml version="1.0" encoding="UTF-8" ?>
<!--
By modifying this file, you can customize your context menu popuped as right clicking on the edit zone.
It may be more convinient to access to your frequent used commands via context menu than via the top menu.
Please check "How to Customize the Context Menu" on:
https://npp-user-manual.org/docs/config-files/#the-context-menu-contextmenu-xml
-->
<NotepadPlus>
<ScintillaContextMenu>
@HurtzDonut
HurtzDonut / CustomFontSubstitues.reg
Created May 18, 2022 18:09
Windows Fonts Registry Keys
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
"Arabic Transparent"="Arial"
"Arabic Transparent Bold"="Arial Bold"
"Arabic Transparent Bold,0"="Arial Bold,178"
"Arabic Transparent,0"="Arial,178"
"Arial Baltic,186"="Arial,186"
"Arial CE,238"="Arial,238"
"Arial CYR,204"="Arial,204"
@HurtzDonut
HurtzDonut / powershell.jsonc
Created November 1, 2022 17:37
VSCode User Snippet - PowerShell
{
// Place your snippets for powershell here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",