Skip to content

Instantly share code, notes, and snippets.

View jsdecena's full-sized avatar
👑
Focusing

Jeff Decena jsdecena

👑
Focusing
View GitHub Profile
{
config: {
domain_key: "jarvisfitnessdev",
template_name: "Default",
alignment: "center",
name: "Dave McCready",
email: "[email protected]", // Change this every refresh
email_hash: "38c9851cfa875239deac05a0730afbee4f2912ab02d7e44ff8bebe2739ef4095", // Change this when you change email
created: 1711353796
},
@jsdecena
jsdecena / hl7.ts
Last active August 4, 2022 23:20
hl7-message
MSH|^~\&|ADT1|MCM|FINGER|MCM|198808181126|SECURITY|ADT^A01|MSG00001|P|2.3.1
EVN|A01|198808181123
PID|1||PATID1234^5^M11^ADT1^MR^MCM~123456789^^^USSSA^SS||SMITH^WILLIAM^A^III||19610615|M||C|1200 N ELM STREET^^JERUSALEM^TN^99999?1020|GL|(999)999?1212|(999)999?3333||S||PATID12345001^2^M10^ADT1^AN^A|123456789|987654^NC
NK1|1|SMITH^OREGANO^K|WI^WIFE||||NK^NEXT OF KIN
PV1|1|I|2000^2012^01||||004777^CASTRO^FRANK^J.|||SUR||||ADM|A0

Authenticate and Save Token

const data = JSON.stringify({
  "api_key": "ff3a4889-94d0-4b85-92af-d545607f4d77",
  "api_secret": "79b1a302-8409-46a9-ba6e-8c5c30c11d2f",
  "grant_type": "client_credentials"
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
@jsdecena
jsdecena / TimezoneTest.php
Created October 9, 2021 05:31
Simple TDD - TimezoneTest - before
<?php
namespace Jsdecena\Simpletdd\Tests\Unit;
use Carbon\Carbon;
use DateTimeZone;
use Illuminate\Foundation\Application;
use Jsdecena\SimpleTdd\TimezoneUtil;
use Orchestra\Testbench\TestCase;
@jsdecena
jsdecena / TimezoneTest.php
Created October 9, 2021 05:31
Simple TDD - TimezoneTest - after
<?php
namespace Jsdecena\Simpletdd\Tests\Unit;
use Carbon\Carbon;
use DateTimeZone;
use Illuminate\Foundation\Application;
use Jsdecena\SimpleTdd\TimezoneUtil;
use Orchestra\Testbench\TestCase;
@jsdecena
jsdecena / composer.json
Created October 9, 2021 05:17
Root composer json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
@jsdecena
jsdecena / TimezoneTest.php
Created October 9, 2021 05:12
Simple TDD - Timezone test - success
<?php
namespace Jsdecena\Simpletdd\Tests\Unit;
use Carbon\Carbon;
use DateTimeZone;
use Illuminate\Foundation\Application;
use Orchestra\Testbench\TestCase;
class TimezoneTest extends TestCase
@jsdecena
jsdecena / timezonetest.php
Last active October 9, 2021 05:06
Simple TDD - Timezone test, failed scenario
<?php
namespace Jsdecena\Simpletdd\Tests\Unit;
use Carbon\Carbon;
use DateTimeZone;
use Illuminate\Foundation\Application;
use Orchestra\Testbench\TestCase;
class TimezoneTest extends TestCase
@jsdecena
jsdecena / before.json
Created October 9, 2021 04:49
Simple TDD - ocmposer.json - before
{
"name": "jeff/simple-tdd-10-steps",
"authors": [
{
"name": "Jeff",
"email": "[email protected]"
}
],
"require": {}
}
@jsdecena
jsdecena / after.json
Last active October 9, 2021 04:48
Simple TDD - composer.json file - after
{
"name": "jeff/simple-tdd-10-steps",
"authors": [
{
"name": "Jeff",
"email": "[email protected]"
}
],
"autoload": {
"psr-4": {