Formatting JSON with VIM

I am working on an analytics project where we generate very complicated medical analysis and put it in a hierarchical data model. { “test” : { “test1” : “val1” } } Open the JSON in vim and use python -m json.tool :%!python -m json.tool Results { “test”: { “test1”: “val1” } } References […]

Urban Code Deploy: When a value doesn’t exist?

Urban Code Deploy: When a value doesn’t exist? Recently, I ran into an issue with a resource referece in an Urban Code Deploy (UCD) resource that did not yet exist. When the value, that doesn’t yet exist I found this a great tip (UCD Documentation). Change from ${p:resource/value-not-yet-populated} to ${p?:resource/value-not-yet-populated} UCD replaces the missing value […]

Generating Swagger as part of a Maven Build

Most of my projects use Maven to build and coordinate dependencies and run unit and build integration tests. I’ve found it a real pain that I could not generate my swagger docs as part of the build. I have found a really easy way. In Jenkins, I have a downstream job that runs specific maven […]

JAX-RS Servlet properties

Recently, I have done a good amount of JAX-RS development, and I needed to kept hitting an issue with forms parameter validation errors on my query params.  The errors kept driving me nuts, until I read the documentation and found – jersey.config.servlet.form.queryParams.disabled .   I also learned the java property is available for those with code […]

Git Lab Merge and Pull Request Templates – An Experiment

Git Lab Merge Request Templates are a fairly exciting way for me to help drive consistency in the projects I am participating in – internal, external and personal.   I created a new folder in .gitlab/issue_templates/and added a file ( based on Pull Request).  For GitHub (not GitLab) switch the folder to .github. When you […]

Primer: Tips for using Random Test Files

On Mac and Linux, create a random file ( dd if=/dev/urandom of=random-test-file-100m bs=1024k count=100 Example: $ dd if=/dev/urandom of=random-test-file-100m bs=1024k count=100 100+0 records in 100+0 records out 102400000 bytes transferred in 10.143507 secs (10095128 bytes/sec) This is a random file. You should also use shasum -A 256 and make sure the file you are using […]