Skip to content

Instantly share code, notes, and snippets.

@ErikPlachta
ErikPlachta / Set-ScreenBrightness.ps1
Last active June 1, 2024 17:11
Using PowerShell to set the brightness of supported displays with parameters.
<#
.SYNOPSIS
Sets the brightness of supported displays to a specified level.
.DESCRIPTION
This function adjusts the brightness of the display using WMI (Windows Management Instrumentation). It works by invoking the WmiSetBrightness method on instances of the WmiMonitorBrightnessMethods class.
.PARAMETER BrightnessLevel
Specifies the brightness level to set. Acceptable values are integers ranging from 0 to 100.
@ErikPlachta
ErikPlachta / salesforce-community-custom-search.js
Created March 18, 2022 22:28
A Custom Salesforce Community Search Component for POS Nation's Salesforce
//-- Grab search element that will be doing search
const searchInput = document.getElementById("search-custom-erikplachta");
//-- where results message appears
const resultsMessage = document.querySelector("#results-message");
//-- where search URL to appear for aareness
const searchLocation_Base = document.querySelector("#search-url");
//-- defined on load as global by default.
@ErikPlachta
ErikPlachta / CS Regex Reference Guide JavaScript.md
Last active March 12, 2022 15:17
CS Regex Reference Guide

CS Regex Reference Guide for JavaScript

Check out this Gist if you're interested in learning more about Regex, aka Regular Expressions.

It's not a complete guide, but I did cover the basics to help you get started. I've also included my references and contact information at the bottom if you want to learn more.