Skip to content

Instantly share code, notes, and snippets.

Retrieves all of the trust relationships for this domain - Does not Grab Forest Trusts
([System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()).GetAllTrustRelationships()
Grab Forest Trusts.
([System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest()).GetAllTrustRelationships()
@morisono
morisono / olecheck.py
Created April 23, 2026 09:47 — forked from decalage2/olecheck.py
olecheck - a simple script to identify potential CVE-2026-21509 samples
# script to scan MS Office files, looking for "Shell.Explorer" OLE objects which could match CVE-2026-21509
# using oletools - https://github.com/decalage2/oletools
# Philippe Lagadec 2026-01-28
# NOTES:
# According to the MS advisory https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-21509
# the CVE-2026-21509 vulnerability is related to CLSID "EAB22AC3-30C1-11CF-A7EB-0000C05BAE0B",
# corresponding to the "Shell.Explorer" COM object, which can be used to open the legacy
# Internet Explorer engine (aka Trident/MSHTML) from any application.
# So to exploit CVE2026-21509 from a MS Office document, one could use either an OLE object
@morisono
morisono / workbench.colorCustomizations.json
Created April 3, 2026 03:43 — forked from dcts/workbench.colorCustomizations.json
A list of all Visual Studio Code customizable colors, grouped by UI region. Copy and paste into User Settings (comments are allowed) to tweak an existing theme or work on your own.
"workbench.colorCustomizations": {
// Contrast Colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast.
"contrastActiveBorder": "",
"contrastBorder": "",
// Base Colors
"focusBorder": "",
"foreground": "",
"widget.shadow": "",
"selection.background": "",
"descriptionForeground": "",
@morisono
morisono / vscode-default-color-theme.json
Created April 3, 2026 03:42 — forked from javifm86/vscode-default-color-theme.json
Default colors used in VSCode, useful if you want to create your own theme using your color palette and want to provide similar colors to the defaults ones.
{
"name": "Default colors dark",
"type": "dark",
"colors": {
// Base colors
"focusBorder": "#007fd4",
"foreground": "#cccccc",
"widget.shadow": "#0000005c",
// "selection.background": // null
@morisono
morisono / workbench.colorCustomizations.json
Created April 3, 2026 03:42 — forked from uncasually/workbench.colorCustomizations.json
A list of all the available customizations for Visual Studio Code workbench color theme with the workbench.colorCustomizations user setting. As of 1.78 (2023)
"workbench.colorCustomizations": {
// Contrast colors - The contrast colors are typically only set for high contrast themes. If set, they add an additional border around items across the UI to increase the contrast
"contrastActiveBorder": "", //An extra border around active elements to separate them from others for greater contrast.
"contrastBorder": "", //An extra border around elements to separate them from others for greater contrast.
//Base colors
"focusBorder": "", //Overall border color for focused elements. This color is only used if not overridden by a component.
"foreground": "", //Overall foreground color. This color is only used if not overridden by a component.
"disabledForeground": "", //Overall foreground for disabled elements. This color is only used if not overridden by a component.
"widget.border": "", //Border color of widgets such as Find/Replace inside the editor.
"widget.shadow": "", //Shadow color of widgets such as Find/Replace inside the editor.
@morisono
morisono / settings.json
Created April 3, 2026 03:41 — forked from ManzDev/settings.json
VSCode settings.json (2026)
{
/* UI */
"workbench.colorTheme": "Monokai +Blue",
"workbench.sideBar.location": "right",
"window.zoomLevel": 2,
"breadcrumbs.enabled": false,
"workbench.iconTheme": "vscode-icons",
"telemetry.telemetryLevel": "off",
"window.commandCenter": false,
@morisono
morisono / settings.jsonc
Created April 3, 2026 03:41
vscode settings
{
// breadcrumbs
"breadcrumbs.enabled": false,
// editor
"editor.lineNumbers": "relative",
"editor.guides.indentation": false,
"editor.guides.bracketPairs": false,
"editor.guides.bracketPairsHorizontal": false,
"editor.guides.highlightActiveBracketPair": false,
@morisono
morisono / settings.json
Created April 3, 2026 03:31 — forked from diego3g/settings.json
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 16,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [
80,
120
],
@morisono
morisono / git-hook-post-checkout.sh
Created April 3, 2026 03:30 — forked from f-honcharenko/git-hook-post-checkout.sh
This Bash script dynamically updates the VS Code `settings.json` file with the current Git branch name. It ensures that any previous dynamically added instructions are removed before appending the new branch name. This is useful for tools like GitHub Copilot Chat to generate commit messages based on the active branch.
#!/bin/bash
# Run the custom script whenever a branch is checked out
"/Users/$USER/Library/Application Support/Code/User/update-copilot-branch-instructions.sh"
# Check if the custom script executed successfully
if [ $? -eq 0 ]; then
# If the script was successful, print the success message
echo "Successfully updated Copilot commit message generation instructions with the current Git branch name."
else