Skip to content

Instantly share code, notes, and snippets.

View baker-ling's full-sized avatar

Brian D. Baker baker-ling

View GitHub Profile
@baker-ling
baker-ling / pre-commit.sh
Last active April 7, 2023 13:11
Pre-commit hook to make sure that client secret is parameterized in Jmeter scripts
#!/bin/bash
# Define the pattern to search for
pattern='client_secret'
# Define the elements to search in
udv_element='UserDefinedVariables'
http_element='HTTPSamplerProxy'
# Loop over all the .jmx files being committed
@baker-ling
baker-ling / arrayMethods.md
Created July 12, 2022 04:46
JavaScript Array method cheatsheet

JavaScript Array Method CheatSheet

  1. .forEach()
  2. .map()
  3. .filter()
  4. .reduce()

.forEach()

  • Purpose: basic alternative to the for loop that bypasses use of array indexes
@baker-ling
baker-ling / email_regex_rfc6531.md
Last active December 11, 2023 12:53
Email Regex (RFC 6531)
@baker-ling
baker-ling / show_text_for_codepoints.bas
Last active May 15, 2021 00:32
VBA: Show a message box of selected VBA code but with hardcoded Unicode characters rendered
#If VBA7 Then
Private Declare PtrSafe Function MessageBoxW Lib "user32" (ByVal hWnd As LongPtr, ByVal lpText As LongPtr, ByVal lpCaption As LongPtr, ByVal uType As Long) As Long
#Else
Private Declare Function MessageBoxW Lib "user32" (ByVal hWnd As Long, ByVal lpText As Long, ByVal lpCaption As Long, ByVal uType As Long) As Long
#End If
#If VBA7 Then
Private Declare PtrSafe Function GetActiveWindow Lib "user32" () As LongPtr
#Else
Private Declare Function MessageBoxW Lib "user32" () As Long