Skip to content

Instantly share code, notes, and snippets.

// Get credit card bank statements
[
...document.querySelectorAll("i[id$='requestThisDocumentLink-download']"),
].forEach((v, i) => setTimeout(() => v.click(), 2500 * i));
// Get savings/checking account statements
[
...document.querySelectorAll("i[id$='downloadDocumentDropdown-icon']"),
].forEach((v, i) =>
setTimeout(() => {

Git Reference

Repo Reorging

Create new repo from a folder

git clone <base repo>
cd <base repo>
git filter-repo --path folder/
git remote set-url origin <new repo>
git push -u origin main

Splunk Reference

Tips

  1. Check your timeframe
  2. Use an index if possible index=main
  3. Start simple
  4. Test your query after each change
  5. Use shift+enter to add a new line
  6. AND is implied between commands

Regex Reference

Match one word or the other

(?:apple|banana)
list="a b"
for x in $list; do
echo $x
done
for x in "a" "b"; do
echo $x
done

Gradle Linting Plugins

Gradle Dependency Linting

Install

Add the following to the plugins section of build.gradle

id 'nebula.lint' version '16.17.0'

Add the following for gradle dependency linting

@kjivan
kjivan / create-self-signed-cert-and-pkcs12.bash
Last active July 2, 2021 19:49
Creates Self Signed Cert and PKCS12
#!/usr/bin/env bash
set -euo pipefail
if [ $# -ne 3 ]
then
echo ""${0##*/}" CN OU FILE_NAME"
exit
fi
# Certificate Attributes
@kjivan
kjivan / splunk-queries.md
Last active December 17, 2021 16:38
Splunk Queries

Splunk Queries

Getting Errors

index=<index>
AND CASE("ERROR")

Java Exceptions & Stack Traces

@kjivan
kjivan / sql-reference.md
Last active November 12, 2021 22:16
SQL Reference
@kjivan
kjivan / kubectl-reference.md
Last active April 2, 2021 21:52
Kubectl Reference

Extract Truststore from secret

kubectl get secret <secret> \
-o json \
| jq --raw-output '. | .data."<trust-store>.jks"' \
| base64 -D > <trust-store>.jks

Patch Secret with TrustStore

Bash