Skip to content

Instantly share code, notes, and snippets.

View mkelley82's full-sized avatar

Michael Kelley mkelley82

View GitHub Profile
@mkelley82
mkelley82 / .block
Created October 11, 2018 19:23 — forked from mbostock/.block
Kentucky Population Density
license: gpl-3.0
var doesDefinePropertyWork = function doesDefinePropertyWork(object) {
try {
Object.defineProperty(object, 'sentinel', {});
return 'sentinel' in object;
} catch (exception) {
return false;
}
};
var definePropertyWorksOnObject = doesDefinePropertyWork({});
@mkelley82
mkelley82 / web.config
Last active January 11, 2024 08:16
Web.config for vue-router to handle history mode / deep links on IIS (w/ custom 404 and 500 error pages)
<?xml version="1.0"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Handle History Mode and custom 404/500" stopProcessing="true">
<match url="(.*)" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
@mkelley82
mkelley82 / json_serialization_gist.cs
Last active October 15, 2015 05:18
example of models...
namespace mpk.Models
{
public class District
{
public District()
{
DistrictDistributor = new HashSet<DistrictDistributor>();
DistrictManufacturer = new HashSet<DistrictManufacturer>();
DistrictProduct = new HashSet<DistrictProduct>();
}