Skip to content

Instantly share code, notes, and snippets.

@SeanCannon
SeanCannon / dnsmasq OS X.md
Created July 14, 2022 02:20 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

const R = require('ramda'), // 0.26.1
winston = require('winston'); // 2.4.x
const winstonConf = {
transports : [
{
transportType : 'console'
}
],
strategies : {
@SeanCannon
SeanCannon / mockPatients.js
Created April 20, 2016 18:06
JavaScript object which helps populate the care coordinator workstation's "patient profile card"
[
{
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 October 28, 2024 18:01
PHP array_flatten() function. Convert a multi-dimensional array into a single-dimensional array.
<?php
/**
* Convert a multi-dimensional array into a single-dimensional array.
* @author Sean Cannon, LitmusBox.com | [email protected]
* @param array $array The multi-dimensional array.
* @return array
*/
function array_flatten($array) {
if (!is_array($array)) {
(function(){
alert(foo);
var foobar = 'Goodbye world';
alert(foo);
})();