Skip to content

Instantly share code, notes, and snippets.

@kjivan
kjivan / github-actions.md
Last active July 14, 2023 20:38
Github Actions

Github Actions

Running github actions repeatedly

gc -m "Whatever" -a; \
gp; \
gh pr create --fill; \
gh pr merge -m
apply plugin: 'com.diffplug.spotless'
spotless {
java {
removeUnusedImports()
prettier(['prettier': 'latest', 'prettier-plugin-java': 'latest']).config(['parser': 'java', 'useTabs': true])
}
groovyGradle {
greclipse()
}
}
// 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