Skip to content

Instantly share code, notes, and snippets.

💭
Building

David Murdoch davidmurdoch

💭
Building
Block or report user

Report or block davidmurdoch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View css30.xml
<?xml version="1.0" encoding="utf-8" ?>
<cssmd:cssmd xmlns:cssmd="http://schemas.microsoft.com/Visual-Studio-Intellisense/css" version="VS8" description="CSS3 validation data">
<cssmd:property-set>
<!-- Based on the original css21.xml from Visual Studio 2010 -->
<!-- Font Properties -->
<cssmd:property-def _locID="color" _locAttrData="description,syntax" type="color"
description="Color of an element's text"
syntax="#RRGGBB | Named Color | rgb(R, G, B) | rgba(R, G, B, A) | inherit"
enum="inherit Aqua Black Blue Fuchsia Gray Green Lime Maroon Navy Olive Orange Purple Red Silver Teal White Yellow ActiveBorder ActiveCaption AppWorkspace Background ButtonFace ButtonHighlight ButtonShadow ButtonText CaptionText GrayText Highlight HighlightText InactiveBorder InactiveCaption InactiveCaptionText InfoBackground InfoText Menu MenuText Scrollbar ThreeDDarkShadow ThreeDFace ThreeDHighlight ThreeDLighShadow ThreeDShadow Window WindowFrame WindowText"/>
@davidmurdoch
davidmurdoch / css30.xml
Created Mar 24, 2011 — forked from KrofDrakula/css30.xml
CSS 3 validation for Visual Studio 20(08|10)
View css30.xml
<?xml version="1.0" encoding="utf-8" ?>
<cssmd:cssmd xmlns:cssmd="http://schemas.microsoft.com/Visual-Studio-Intellisense/css" version="VS8" description="CSS3 validation data">
<cssmd:property-set>
<!-- Based on the original css21.xml from Visual Studio 2010 -->
<!-- Font Properties -->
<cssmd:property-def _locID="color" _locAttrData="description,syntax" type="color"
description="Color of an element's text"
syntax="#RRGGBB | Named Color | rgb(R, G, B) | rgba(R, G, B, A) | inherit"
enum="inherit Aqua Black Blue Fuchsia Gray Green Lime Maroon Navy Olive Orange Purple Red Silver Teal White Yellow ActiveBorder ActiveCaption AppWorkspace Background ButtonFace ButtonHighlight ButtonShadow ButtonText CaptionText GrayText Highlight HighlightText InactiveBorder InactiveCaption InactiveCaptionText InfoBackground InfoText Menu MenuText Scrollbar ThreeDDarkShadow ThreeDFace ThreeDHighlight ThreeDLighShadow ThreeDShadow Window WindowFrame WindowText"/>
View dominant-color.js
function getDominantColor(aImg) {
let canvas = document.createElement("canvas");
canvas.height = aImg.height;
canvas.width = aImg.width;
let context = canvas.getContext("2d");
context.drawImage(aImg, 0, 0);
// keep track of how many times a color appears in the image
let colorCount = {};
@jinxidoru
jinxidoru / closeable_http_server.ts
Last active Feb 11, 2020
Closeable http server
View closeable_http_server.ts
import * as http from 'http'
import * as _ from 'lodash'
//! In the standard implementation of http server, calling close is not guaranteed to close the
//! server. Any idle connections being kept alive by clients will stay open until their timeout
//! is reached. This is problematic for gracefully shutting down a process with an http server.
//! This function will create an http server that tracks the open connections. On close, idle
//! connections are closed and any newly idled connection is immediately closed as well. When there
//! are no more connections on the server, the 'empty' event is raised.
You can’t perform that action at this time.