Skip to content

Instantly share code, notes, and snippets.

shsteimer / pre-commit
Created August 3, 2022 20:03
Pre-Commit hook to prevent modifications to immutable dispatcher files
# An example hook script to verify what is about to be committed.
# Called by "git commit" with no arguments. The hook should
# exit with non-zero status after issuing an appropriate message if
# it wants to stop the commit.
if git rev-parse --verify HEAD >/dev/null 2>&1
shsteimer /
Last active March 30, 2023 01:09
A bash script to run mvn clean on all projects in a directory
find /Users/ssteimer/dev/workspaces -type f -name "pom.xml" | while read line;
echo found file at $line
cd $pomDir
mvn clean
@Component(configurationFactory = true,
policy = ConfigurationPolicy.REQUIRE, metatype = true, immediate = true)
public class MyFactoryConfigServiceClass {
//define config properties here as usual
@Property(name = "", label = "My Property", value = "")
private String myProperty
shsteimer / gist:7257245
Created October 31, 2013 21:10
Tip to delete tags by pattern
#delete all the remote tags with the pattern your looking for, ie. DEV-
git tag | grep <pattern> | xargs -n 1 -i% git push origin :refs/tags/%
#delete all your local tags
git tag | xargs -n 1 -i% git tag -d %
#fetch the remote tags which still remain
git fetch