Skip to content

Instantly share code, notes, and snippets.

View sleberknight's full-sized avatar

Scott Leberknight sleberknight

  • Fortitude Technologies
  • Leesburg, VA
View GitHub Profile
@sleberknight
sleberknight / jv
Created November 28, 2023 20:13
Silly java version script
#/bin/bash
# Silly script to show the current java version so I don't have to always type java -version.
# It also suppresses the JAVA_TOOL_OPTIONS by default, while proviging an option to show it.
# And, you can use a command line option to show only the first line of output, which is usually enough.
# functions
print_usage() {
echo "Usage: $0 [-h] [-1] [-t]"
echo
@sleberknight
sleberknight / mvn-versions-examples.sh
Created August 9, 2023 18:40
Useful Maven Versions Plugin Commands
# Assumes using Maven Daemon (mvnd) but commands work with regular mvn as well
# Display dependency updates
mvnd versions:display-dependency-updates
# Display property updates
mvnd versions:display-property-updates
# Display plugin updates
mvnd versions:display-plugin-updates
@sleberknight
sleberknight / run-dev-consul.sh
Created June 15, 2023 18:44
Run single-node Consul for development
# Run the Consul agent in development mode and specify the node name
consul agent -dev -node <node-name>
# e.g.
consul agent -dev -node my-server
# reference: https://developer.hashicorp.com/consul/tutorials/certification-associate-tutorials/get-started-agent
@sleberknight
sleberknight / run-jshell-maven-plugin.sh
Created February 22, 2023 18:45
Run JShell Maven Plugin (even if not in POM)
mvn test-compile com.github.johnpoth:jshell-maven-plugin:1.3:run
# To also include the test classpath:
mvn -DtestClasspath=true test-compile com.github.johnpoth:jshell-maven-plugin:1.3:run
# reference: https://github.com/johnpoth/jshell-maven-plugin
@sleberknight
sleberknight / codeql.yml
Last active February 9, 2023 20:48
CodeQL GitHub workflow configuration
name: "CodeQL"
on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
types: [ opened, synchronize, reopened ]
paths-ignore:
@sleberknight
sleberknight / run-jacoco.sh
Created September 23, 2022 16:01
Run jacoco in Maven
mvn org.jacoco:jacoco-maven-plugin:prepare-agent verify org.jacoco:jacoco-maven-plugin:report