Skip to content

Instantly share code, notes, and snippets.


David Murdoch davidmurdoch

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
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="" version="VS8" description="CSS3 validation data">
<!-- 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 frame-buster-buster
var preventBust = 0;
window.onbeforeunload = function () {
setInterval(function () {
if (preventBust > 0) {
preventBust -= 2; = "/statuscode/204";
davidmurdoch / chromeless\modules\lib\chromeless-policy.js
Created May 27, 2011
How do I register this so I can use nsIContentPolicy shouldLoad method?
View chromeless\modules\lib\chromeless-policy.js
const {Cc, Ci, Cu, Cm, Cr} = require("chrome");
const xpcom = require("xpcom");
class definition
var description = "Chromeless Policy XPCOM Component";
/* UID generated by */

JavaScript Code

var str = "hi";

Memory allocation:

Address Value Description
...... ...
davidmurdoch / snippet-deflator.aspx.cs
Created Oct 9, 2013
The code behind my snippet deflator ( Original written sometime in 2009.
View snippet-deflator.aspx.cs
protected void Page_Load(object sender, EventArgs e)
if (Request.Form != null && Request.Form.Count > 0 && Request.Form["text"] != null)
var text = Request.Form["text"];
byte[] byteArray = Encoding.ASCII.GetBytes(text);
using (var stream = new MemoryStream())
using (var strm = new zlib.ZOutputStream(stream, zlib.zlibConst.Z_BEST_COMPRESSION, false))
davidmurdoch / HackyBigDecimal.js
Created May 3, 2019
Hacked together an implementation of big decimals using `BigInt`. Doesn't do division very well. Lots of issues.
View HackyBigDecimal.js
function getDecimalSeparator(locale) {
const numberWithDecimalSeparator = 1.1;
return Intl.NumberFormat(locale)
.find(part => part.type === 'decimal')
const RADIX_PREFIX = {
You can’t perform that action at this time.