Skip to content

Instantly share code, notes, and snippets.

View Forest-Dewberry's full-sized avatar

Forest Dewberry Forest-Dewberry

View GitHub Profile
@Forest-Dewberry
Forest-Dewberry / ExpensesFilter.js
Created July 5, 2023 19:49
Udemy React Complete Guide 2023 Section 5 Assignment 2: Expenses Filter
import React from 'react';
import './ExpensesFilter.css';
const ExpensesFilter = (props) => {
const [selectedYear, setSelectedYear] = React.useState('2020');
const selectYearHandler = (e) => {
setSelectedYear(e.target.value);
props.onSelectYear(e.target.value);
}
@Forest-Dewberry
Forest-Dewberry / reformat_dominion.games_log.py
Created November 27, 2022 17:35
reformat dominion.games logs
def readfile(filepath):
data=''
if not (filepath==''):
with open(filepath, 'r') as file:
data = file.read()
return data
def writefile(filepath,contents=''):
@Forest-Dewberry
Forest-Dewberry / All Windows Features' Names, DisplayNames, and Descriptions
Created July 18, 2022 16:30
All Windows Features' Names, DisplayNames, and Descriptions
$csv = @()
$csv += ,("Name","DisplayName","Description")
$csv += ,("AD-Certificate","Active Directory Certificate Services","Active Directory Certificate Services (AD CS) is used to create certification authorities and related role services that allow you to issue and manage certificates used in a variety of applications.")
$csv += ,("ADCS-Cert-Authority","Certification Authority","Certification Authority (CA) is used to issue and manage certificates. Multiple CAs can be linked to form a public key infrastructure.")
$csv += ,("ADCS-Enroll-Web-Pol","Certificate Enrollment Policy Web Service","The Certificate Enrollment Policy Web Service enables users and computers to obtain certificate enrollment policy information even when the computer is not a member of a domain or if a domain-joined computer is temporarily outside the security boundary of the corporate network. The Certificate Enrollment Policy Web Service works with the Certificate Enrollment Web Service to provide policy-based automatic certificate enr
$modulesFolder = ($env:PSModulePath -split ";")[0]; $modulesFolder; wsl bash -c "./copyPSmodules.sh '$modulesFolder' 'functions'"
#!/usr/bin/env bashSCRIPT_IS_RUN_FROM=$(pwd)
PS_DEFAULT_DIR="$1"
PS_DEFAULT_DIR="$(wslpath -- "$PS_DEFAULT_DIR")"
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; # get the script dir
# Now loop through every file in MyFunctionsModules
# Each file should have a directory of the same name created in and be copied to that directory.
cd -- "$SCRIPT_DIR"
cd -- "$2"
FILESFROM=$(pwd)
for i in *
notepad copyPSmodules.sh
$modulesFolder = ($env:PSModulePath -split ";")[0]
> ls .\functions\
Directory: C:\Users\itsme\functions
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---l 6/14/2022 1:35 PM 37452 MyModule.ps1
$ tree functions/
functions/
└── MyModule.ps1
Get-Command -module MyModule