View sb-filesModel.js
angular.module("sb", [ ]).directive('filesModel', FilesModel);
FilesModel.$inject = [ "$parse"];
function FilesModel($parse) {
return {
restrict: 'A',
link: function (scope, element, attr) {
var model = $parse(attr.filesModel);
View PlaintextSecureDataFormat.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using Microsoft.AspNet.Identity;
using Microsoft.Owin.Security;
namespace ScrambledBrains {
public class PlaintextSecureDataFormat : ISecureDataFormat<AuthenticationTicket> {
public string Protect(AuthenticationTicket data) {
View profile.cmd
@echo off
:: Adds support for
:: `cd` change to user profile directory
:: `cd -` change to previous directory
doskey cd=^
set PD=%%CD%% ^& ^
if [$*]==[] ( ^
cd /d %%userprofile%% ^
View travis-version-snippet.sh
OWNER=$(echo ${TRAVIS_REPO_SLUG} | grep -Po '\w*' | head -n 1)
# Get the tags
TAGS="$(curl -s -u ${OWNER}:${SECRET} https://api.github.com/repos/${TRAVIS_REPO_SLUG}/git/refs/tags | grep -Po '(ref|sha)":.*' | paste -d" " - -)"
# Get the most recent tag number
VER=$(echo "${TAGS}" | sed 's/ref": "refs\/tags\/v//g' | sed 's/", sha":.*//g' | sort -V | tail -n 1)
# Get the associated tag ref
TAG_SHA=$(echo "${TAGS}" | grep $VER | sed 's/.*sha": "//g' | sed 's/",//g')
View inherited-state-pattern.js
var Modal = (function() {
function createType(subTypeBox) {
var subTypeBox = subTypeBox || { };
var internal = { }; // "protected" state bag
var stack = [ ]; // "private" field
// Name the constructor function strictly for debug purposes, in a way that doesn't spill throughout this scope.
var Type = (function() { return function Modal(id) { this.id = id; }; })();
View keybase.md

Keybase proof

I hereby claim:

  • I am mcgwiz on github.
  • I am mcgwiz (https://keybase.io/mcgwiz) on keybase.
  • I have a public key whose fingerprint is 5D4D 6C42 EEC9 1AF2 07E0 6223 D32E 7D0C 3CDA B00F

To claim this, I am signing this object:

View ToTitleFromPascalCase
static string ToTitleFromPascalCase(string s) {
var sb = new StringBuilder();
for (var i = 0; i < s.Length; i++) {
var c = s[i];
if (c == ' ') { continue; }
if (i == 0) { sb.Append(c); continue; }
if (!char.IsUpper(c)) { sb.Append(c); continue; }
if (!char.IsUpper(s[i - 1])) { sb.Append(' ').Append(c); continue; }
View pre-commit
#!/bin/sh
#set -x
git diff-index --cached --quiet HEAD
_ANY=$?
if ((0 == $_ANY)); then
exit 0
fi
View .gitattributes
*.js diff="javascript"