Skip to content

Instantly share code, notes, and snippets.

@MatthewVita
MatthewVita / KOTemplateLoader.js
Last active August 29, 2015 13:57
KOTemplateLoader.js - Loader that easily renders external Knockout.js templates [jQuery dependency]
/*
* @desc: loads an external
* HTML Knockout.js template
* file, places it in the DOM,
* and applies the KO bindings
*
* @param: tmplFile - the template
* file
*
* @param: targetElem - the target
@MatthewVita
MatthewVita / keybase.md
Last active August 29, 2015 13:57
keybase.md

Keybase proof

I hereby claim:

  • I am MatthewVita on github.
  • I am matthewvita (https://keybase.io/matthewvita) on keybase.
  • I have a public key whose fingerprint is A1B4 7008 225E 3FB2 7427 CE4E 8195 0C2C 22C8 46C9

To claim this, I am signing this object:

@MatthewVita
MatthewVita / Empty.js
Last active August 29, 2015 14:07
Empty.js - Convenience function, checks for "empty" values
//@desc: Convenience function that
//checks for "empty" values
//@use: console.log(Empty('hello!')); //false
function Empty(val) {
return (typeof(val) === 'undefined' || typeof(val) === 'null' || val === '' || typeof(val) === 'NaN' || val === false);
}
@MatthewVita
MatthewVita / AmberParser.go
Last active August 29, 2015 14:07
AmberParser.go - Convenience package for parsing Amber templates with JSON parameters
/*
*@desc: Convenience package for parsing
* Amber templates with JSON parameters
*
*@use:
ambrPrsr := amberParser.New("src/views/foobar.amber", `{
"favorite_color":"grey",
"year":"2014",
"baz":"bar"
}`)
@MatthewVita
MatthewVita / Hashtagify.js
Last active August 29, 2015 14:07
Hashtagify.js - Simple regex function that converts hashtags to urls
/*
*@desc: Simple regex function that converts hashtags to urls
*@usage:
* console.log("I love #JavaScript it's a fan#tastic language!".hashtagify());
* ...returns `I love <a href="http://twitter.com/#!/search/#JavaScript">#JavaScript</a> it's a fan#tastic language!`
*/
String.prototype.hashtagify = function() {
return (this.replace(/ (#[a-z0-9][a-z0-9\-_]*)/ig, ' <a href="http://twitter.com/#!/search/$1">$1</a> '));
};
<?xml version="1.0" encoding="UTF-8"?>
<code_scheme name="GoogleStyle">
<option name="JAVA_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="8" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
@MatthewVita
MatthewVita / lint.sh
Last active February 25, 2017 17:32
OpenEMR Parallel Linter
#!/bin/bash
if [ -z "$1" ] || [ "$1" == "-h" ] || [ "$1" == "--help" ] ; then
printf "OpenEMR Parallel Linter\n\n"
printf " Arguments\n"
printf " -h, --help | Information on using this script\n"
printf " -d, --dir | The codebase directory for OpenEMR\n"
exit 0
fi
<?php
class C_ClinicalDocumentProcessing extends Controller {
var $test_data = array(
// Patient ID 1
"1" => array(
// A new patient note ID 32
"encounter_note_32" => array(
"RXNORM" => array(
array(
git checkout develop
git fetch
git pull
git checkout us_123_impl_foobar_feature
git merge origin/develop # Creates a new commit on us_123_impl_foobar_feature, that contains all changes from develop
git reset --soft origin/develop # Generates a set of staged changes
git add -A
git commit -m '[US-123] Adds Foobar'
git checkout develop
git merge us_123_impl_foobar_feature
<?xml version="1.0" encoding="UTF-8"?><xmi:XMI xmlns:refsem="http:///org/apache/ctakes/typesystem/type/refsem.ecore" xmlns:util="http:///org/apache/ctakes/typesystem/type/util.ecore" xmlns:relation="http:///org/apache/ctakes/typesystem/type/relation.ecore" xmlns:structured="http:///org/apache/ctakes/typesystem/type/structured.ecore" xmlns:textspan="http:///org/apache/ctakes/typesystem/type/textspan.ecore" xmlns:tcas="http:///uima/tcas.ecore" xmlns:xmi="http://www.omg.org/XMI" xmlns:cas="http:///uima/cas.ecore" xmlns:type="http:///org/apache/ctakes/drugner/type.ecore" xmlns:assertion="http:///org/apache/ctakes/typesystem/type/temporary/assertion.ecore" xmlns:textsem="http:///org/apache/ctakes/typesystem/type/textsem.ecore" xmlns:syntax="http:///org/apache/ctakes/typesystem/type/syntax.ecore" xmi:version="2.0">
<cas:NULL xmi:id="0"/>
<tcas:DocumentAnnotation xmi:id="1" sofa="6" begin="0" end="25" language="en"/>
<textspan:Segment xmi:id="13" sofa="6" begin="0" end="25" id="SIMPLE_SEGMENT"/>
<tex