Skip to content

Instantly share code, notes, and snippets.

View buddyp450's full-sized avatar
💭
did you get that thing I sent ya?

Charles Patton Jr buddyp450

💭
did you get that thing I sent ya?
View GitHub Profile
@buddyp450
buddyp450 / INSTRUCTIONS.md
Last active October 9, 2020 12:38 — forked from franklsm1/INSTRUCTIONS.md
Auto configure pre-commit hooks for a Gradle Spring App

Steps

  1. create a file called "pre-commit" with no extension in the project directory root
  2. add the code from the pre-commit file below into that new file
  3. create a new file called "preCommit.gradle" inside of the root gradle folder
  4. add the code from the preCommit.gradle file below into that new file
  5. add the following line into the build.gradle file:
    • apply from: "$projectDir/gradle/preCommit.gradle"

Now when you run the ./gradlew build command the git pre-commit hook will be automatically setup.

@buddyp450
buddyp450 / delete_from_elasticsearch.py
Created October 24, 2015 02:12 — forked from dforste/delete_from_elasticsearch.py
Python replacement for elasticsearch delete by query.
#!/bin/python
import elasticsearch
import sys, getopt
def main(argv):
number = 10
search = 'metrics.changes.total:0 AND type:puppet-report'
try:
opts, args = getopt.getopt(argv,"hs:n:",["search=","number="])
except getopt.GetoptError: