Skip to content

Instantly share code, notes, and snippets.

View sixlettervariables's full-sized avatar

Christopher Watford sixlettervariables

View GitHub Profile
@sixlettervariables
sixlettervariables / open_ELI280_ECG.m
Last active March 29, 2023 00:22
Read ELI 280 XML ECG file data in Matlab/Octave
% Example MATLAB/Octave Script to Read ELI 280 ECG XML Files
%
% christopher.watford@gmail.com
%
%
% Written as a standalone script (i.e., not a function)
%
clear;
//
// Quick and Dirty way to read ELI 280 XML Files
// christopher.watford@gmail.com
//
// .NET 5.0 / C# 8.0
//
using System;
using System.IO;
using System.Xml.Linq;
@sixlettervariables
sixlettervariables / FindCompatibilityProblems.cs
Created June 6, 2016 18:00
Sample code to run the .Net Framework Compatibility Diagnostics outside of VS
using System;
using System.Collections.Immutable;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.ComponentModel.Composition.Registration;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
@sixlettervariables
sixlettervariables / RemovePublicKeyTokenProgram.cs
Created August 7, 2015 22:36
Remove PublicKeyToken's from your Code First migration RESX files
// <copyright file="RemovePublicKeyTokenProgram.cs">
// Copyright (c) 2015 Christopher A. Watford (christopher.watford@gmail.com)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//

Keybase proof

I hereby claim:

  • I am sixlettervariables on github.
  • I am watford (https://keybase.io/watford) on keybase.
  • I have a public key whose fingerprint is 80A7 B35C 0E00 658A D9D9 8DB7 590D 18D1 7779 BB15

To claim this, I am signing this object:

@sixlettervariables
sixlettervariables / example-adaro-config.json
Created November 6, 2014 03:28
Example Adaro/Dustjs additional helpers configuration
"view engines": {
"js": {
"module": "engine-munger",
"renderer": {
"method": "js",
"arguments": [
{
"cache": true,
"helpers": [
{
@sixlettervariables
sixlettervariables / silly-windows-versions.md
Last active May 3, 2024 01:42
Why "Windows 10" wasn't chosen because of developers checking "Windows 9"

Why "Windows 10" wasn't chosen because of "braindead" developers checking for Windows 95 or 98.

You may have seen the picture, purporting to have source from a Microsoft developer explaining why Windows had to be versioned 10. The punchline is that so many programmers rely on the version to begin with "Windows 9" if they are running on 95 or 98, that Windows 10 was the only logical choice:

if(version.StartsWith("Windows 9"))
{ /* 95 and 98 */
} else {
@sixlettervariables
sixlettervariables / enrouten-directory.js
Created August 20, 2014 19:45
Enrouten with swaggerize-express support
/**
* Rewrite of express-enrouten's directory handler to use 'routeify()'
*
*/
'use strict';
var path = require('path');
var express = require('express');
@sixlettervariables
sixlettervariables / routify-test.js
Last active August 29, 2015 14:05
Provides Filename to Route hash from a swaggerized directory structure
'use strict';
var fs = require('fs');
var path = require('path');
/* EXAMPLE:
* var routes = routeifyDirectory('./controllers');
* Object.keys(routes).forEach(function (fn) {
* console.log('%s => %s', fn, routes[fn]);
* });
@sixlettervariables
sixlettervariables / router-dump.js
Last active August 29, 2015 14:05
express-enrouten Router Dumper
/** router-dump: Dump the current stack for an expressjs router built with express-enrouten.
* @author Christopher A. Watford <christopher.watford@gmail.com>
*/
'use strict';
/* EXAMPLE OUTPUT
[router] GET /login/ (./controllers/login/index.js)
[router] POST /login/ (./controllers/login/index.js)
[router] GET /login/reset/ (./controllers/login/index.js)