Skip to content

Instantly share code, notes, and snippets.

View jonbartels's full-sized avatar

Jon Bartels jonbartels

  • Louisville, KY
  • 14:03 (UTC -04:00)
View GitHub Profile
@MichaelLeeHobbs
MichaelLeeHobbs / MirthPostgresTableSizeByChannel.psql
Last active October 25, 2023 18:10
Mirth Postgres Table Size By Channel
-- 20201125T1403 EST - Fix bug in xpath not correctly matching values to correct channel
-- 20201125T1430 EST - Updated formatting only using: http://poorsql.com/ with minor hand edits
-- 20201125T1432 EST - Removed CID from final output as it was only there for debugging xpath issues
-- 20210321T1140 EST - Postgres 13+ XPATH works differently see: https://gist.github.com/MichaelLeeHobbs/40b4b7cf70ecbe30b73eed763367e626
--
-- Jon Bartels
-- Similar query for SQL Server is here - https://stackoverflow.com/questions/58942371/get-space-used-by-mirth-per-channel-in-sql-server
--
SELECT NAME AS CHANNEL_NAME
@SlivTaMere
SlivTaMere / bodyDelete.java
Last active September 14, 2021 18:53
How to send body in DELETE request with Apache Fluent (NSFW)
Request r = Request.Delete("http://url.com");
//disgusting hack because Fluent doesn't accept body in DELETE requests.
//Manually set default headers to ensure they are at the begining
r.addHeader("Host", "url.com");
r.addHeader("Connection", "Keep-Alive");
r.addHeader("User-Agent", "Apache-HttpClient/4.5.2 (Java/1.8.0_131)");
r.addHeader("Content-Length", ""+body.length());
r.addHeader("Accept-Encoding", "gzip,deflate");
//Add random header at the end with a valid value(else the header is not added)

NextGen Connect (formerly known as Mirth Connect) Server Setup

Create a VM running Ubuntu. Use a modern version.

Great thanks for the original guide: https://gist.github.com/jgautsch/9157402

# Update Ubuntu
sudo apt-get update

# Upgrade Ubuntu
sudo aptitude upgrade