Skip to content

Instantly share code, notes, and snippets.

@mhokanson
mhokanson / ReadMe.md
Last active February 18, 2025 13:38
Nextgen/Mirth Connect testing in VSCode

Requires:

  • Mirth Connect to be installed locally
  • VSCode task set up with paths pointed to the local Mirth instance (provided file are for default Windows locations)
  • Executed file has to be based on a saved file NOTE: Changes don't have to be saved to execute as the build task will save the file if needed.
  • The path in line 4 of example.js needs to point to a saved copy of mirth_dependencies.js for covered Mirth functionality to work
@mochsner
mochsner / oauth2-mc.js
Created June 22, 2022 16:52
OAuth2-MirthConnect
// Random helpers
// globalMap.put('OS_TYPE', 'WINDOWS');
//globalChannelMap.put('name','val');
logger.info('STARTING TO SEND (WZ-DEST)');
function logChannelMap(key)
{
logger.info(key+':'+globalChannelMap.get(key));
}
@PradyumnaKrishna
PradyumnaKrishna / Commit Date.md
Last active February 4, 2025 20:41
Change Git Commit Date

Change Git Commit Date

  • Commit your git using

    git add -A
    git commit -m "commit message"
    
  • Change time or date of your latest commit

GIT_COMMITTER_DATE="Wed Sep 9 22:00 2020 +0530" git commit --amend --date="Wed Sep 9 22:00 2020 +0530"

@jherax
jherax / configure.md
Last active March 26, 2025 18:10
VS Code: Debugging with Jest

VS Code: Debugging Jest

Sometimes, debugging with console.log is not enough to find out what is happening in the code, as console.log prints only plain objects but neither functions nor objects with circular references. Besides, it's possible you may need to know the context and flow of the code.

Read more about debugging with VS Code in VS Code: Debugging.

@asyd
asyd / models.py
Created May 14, 2018 16:21
Flask SQLAlchemy multiple column unique constraint
class ComponentCommit(db.Model):
__tablename__ = 'component_version'
__table_args__ = (
db.UniqueConstraint('component_id', 'commit_id', name='unique_component_commit'),
)
id = db.Column(db.Integer, primary_key=True)
component_id = db.Column(db.Integer, db.ForeignKey("component.id"))
commit_id = db.Column(db.String)
branch = db.Column(db.String)
dependencies = db.Column(db.Text)
@17twenty
17twenty / gist:2fb30a22141d84e52446
Created February 22, 2016 01:04
POST with NewRequest using Golang
package main
import (
"bytes"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
)
@flaugher
flaugher / gist:ec36ec940a31707ac683
Created March 1, 2015 20:03
Things to do if your Django form.is_valid() method fails
- Check that you inserted "request.POST" as an argument to your form when instantiating the form in your view after the POST.
- Add {{ form.errors }} {{ form.non_field_errors }} to the form or debug your view and print them from the debugger.
- Examine each form field in the debugger: myform['<fieldname>'].value()
- Make sure DEBUG = True so that you'll see any server errors.
- Check your server log.
- If all else fails, step through the is_valid() call.
@iharosi
iharosi / useful-osx-commands.md
Last active September 21, 2023 07:25
Useful OS X commands

###Useful OS X commands

  1. App Store Debug menu

    Show

    defaults write com.apple.appstore ShowDebugMenu -bool true
    

    Hide

<?php
/**
* 1. create project at https://console.developers.google.com/project
* 2. enable 'Analytics API' under 'APIs & auth' / APIs
* 3. create 'NEW CLIENT ID' (OAuth client) under 'APIs & auth' / Credentials
* i. select 'Service account'
* ii. save generated key file to 'key.p12'
* iii. remember CLIENT ID
* 4. under GA account add 'Read & Analyze' access to newly generated email (access to GA Account not Property nor View)
@amolkhanorkar
amolkhanorkar / PG::Error: ERROR: new encoding (UTF8) is incompatible
Last active August 30, 2024 13:31
Postgres PG::Error: ERROR: new encoding (UTF8) is incompatible
======= Prolbem =================================================================================================================
I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute:
rake db:create , command I get:
PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII)
HINT: Use the same encoding as in the template database, or use template0 as template.
: CREATE DATABASE "my_db_name" ENCODING = 'unicode'.......
bin/rake:16:in `load'