Skip to content

Instantly share code, notes, and snippets.

View gist:25f91473277ee1d944f5159d3f5f3983
const R = require('ramda'), // 0.26.1
winston = require('winston'); // 2.4.x
const winstonConf = {
transports : [
{
transportType : 'console'
}
],
strategies : {
@SeanCannon
SeanCannon / mockPatients.js
Created Apr 20, 2016
JavaScript object which helps populate the care coordinator workstation's "patient profile card"
View mockPatients.js
[
{
id : 1,
status : 1,
lastCheckIn : '3 days',
profile : {
firstName : 'Greg',
lastName : 'Henderson',
avatar : 'https://s3.amazonaws.com/uifaces/faces/twitter/felipebsb/128.jpg',
birthDate : '03/22/28',
@SeanCannon
SeanCannon / array_flatten.php
Last active Mar 31, 2022
PHP array_flatten() function. Convert a multi-dimensional array into a single-dimensional array.
View array_flatten.php
<?php
/**
* Convert a multi-dimensional array into a single-dimensional array.
* @author Sean Cannon, LitmusBox.com | seanc@litmusbox.com
* @param array $array The multi-dimensional array.
* @return array
*/
function array_flatten($array) {
if (!is_array($array)) {
View hoist-1
(function(){
alert(foo);
var foobar = 'Goodbye world';
alert(foo);
})();