Skip to content

Instantly share code, notes, and snippets.

View skehlet's full-sized avatar

Steve Kehlet skehlet

View GitHub Profile
@jonbartels
jonbartels / mirth-cert-report.sql
Last active January 3, 2024 14:25
Report on SSL Certificate Usage in Mirth Connect
with channel_xml as (
select
name,
xmlparse(document channel) as channel_xml
from channel c
)
, destination_connector_xml as (
SELECT
name as channel_name,
unnest(xpath('//destinationConnectors/connector/name/text()', channel_xml))::TEXT as connector_name,
@dlenski
dlenski / formatted_link.js
Last active September 23, 2024 16:10
Bookmarklet to copy current page title as a rich-text formatted link
@jonbartels
jonbartels / Managing SSL Connections in MC.md
Last active April 15, 2025 04:31
Mirth Connect has many ways to manage SSL connections. This gist provides a primer on how to manage them. Edits, contributions, and corrections are appreciated!

Mirth Connect is awesome! One common question on the forums and Slack is how to manage SSL connctions. These questions mainly focus on HTTPS but also include TCP connections.

The quick rundown is:

  1. The built-in MC HTTP Sender connector will do HTTPS if:
  • The endpoint has a certificate which is signed by a CA already present in the JVM truststore and has the right DN or SAN for the hostname. This is logically equivalent to the "green check" if you open the URL in a browser.
  • The certificate has been added to the truststore for the JVM that MC is running under
  • Changes to DNS or host files allow a hostname to match the DN or SAN already present in the cert (not reccomended)
  • The connector may flag these connections with a warning or red x. Test the channel first as the validator makes assumptions about SSL that may not apply in this case.
  1. The built-in MC HTTP Listener connector will not do SSL directly. A plugin or a proxy is necessary.
  • Tony Germano has a plugin implemented for SSL l
@ashwinreddy
ashwinreddy / Spotify.lua
Created February 13, 2019 04:19
Hammerspoon configuration to update Mac wallpaper background to the currently playing Spotify track's album artwork
hs.loadSpoon("ReloadConfiguration")
spoon.ReloadConfiguration:start()
function resetImage()
screen = hs.screen.mainScreen()
screen:desktopImageURL("file:///Users/areddy/Pictures/original_8ee2e1707ce7198a75211221f99e6c2d.jpeg")
end
function updateImage()
@ErikSwan
ErikSwan / The American Inferno.md
Last active March 17, 2023 03:21
Text of "The American Inferno", a book by (fictional) author Evelyn Miller in the game Red Dead Redemption 2. Actual author unknown.

The American Inferno

Chapter II

In the end, what has a man but his thoughts? I would postulate further, what has a man to stand for, but his thoughts? His actions, perhaps? I know precious little of actions. Lions, donkeys, hyenas. They all act. So is that what we are? No. We are more and less than the beasts. We are thoughts. We are actions and the reflections upon those actions. Yet, we are also not merely reflections. We are not mirrors.

That is the preserve of spirits, of the gods. We are actions and the thoughts upon actions. Neither one nor other. We are free neither from action, nor from thought. Our humanity can only be understood if we embrace both the animal and the god within us. As humans, we must nourish both, yet America is a land of action. A place fixated not on ideas, not on the redemptive power of thought but on the obliteration of the intellect.

It is a place wherein mankind has attempted to deny half of his being, and in pursuing freedom has attempted to split himself. Much like the

@oldmud0
oldmud0 / gh-pages-old.md
Created May 1, 2018 22:16
Old GitHub Pages IP addresses for A records

On May 1, 2018, GitHub changed the suggested IP addresses to put on the A records for domains that use GitHub Pages. The new ones now support HTTPS for custom domains, but the old ones did not. Here are the old ones for historical purposes:

  • 192.30.252.153
  • 192.30.252.154

Here are the new ones:

  • 185.199.108.153
  • 185.199.109.153
  • 185.199.110.153
@TurekBot
TurekBot / build.gradle
Created January 10, 2018 17:46
Gradle Shadow Example
group 'com.github.yourusername'
version '1.0-SNAPSHOT'
//These are dependencies that have to do with just the build. See: https://stackoverflow.com/a/23627293/5432315
buildscript {
repositories {
jcenter()
}
dependencies {
//This is necessary to use the gradle shadow plugin
@Equinox-
Equinox- / README
Last active April 4, 2025 22:22
Very simple DDS plugin for GIMP that uses texconv to convert things behind the scenes to encode/decode BC7
1. Download the `file-dds-texconv.py` file. Edit BINARY to be the path to your texconv binary (located in the SE ModSDK, or elsewhere)
2. Copy the script into the GIMP plugins directory. For instance, `C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins`
@geeknam
geeknam / cognitoupload.py
Created April 2, 2017 07:13
Upload file to S3 with an authenticated Cognito User
import boto3
import uuid
class CognitoUserFileUploader(object):
def __init__(self, *args, **kwargs):
self.__dict__.update(kwargs)
self.id_token = self.get_cognito_id_token(
self.username, self.refresh_token,
self.device_key, self.client_id
@corbanb
corbanb / pre-request-jwt.js
Last active July 22, 2024 13:12
JWT tokenize - Postman Pre-Request Script
function base64url(source) {
// Encode in classical base64
encodedSource = CryptoJS.enc.Base64.stringify(source);
// Remove padding equal characters
encodedSource = encodedSource.replace(/=+$/, '');
// Replace characters according to base64url specifications
encodedSource = encodedSource.replace(/\+/g, '-');
encodedSource = encodedSource.replace(/\//g, '_');