Skip to content

Instantly share code, notes, and snippets.

@mike-ward
mike-ward / BlogConfiguration.cs
Last active December 16, 2015 15:09
Custom Configuration Section for Web.config
using System.Configuration;
namespace bloget2.Models
{
public class BlogConfiguration : ConfigurationSection
{
[ConfigurationProperty("title", IsRequired = true)]
public string Title
{
get { return this["title"] as string; }
@mike-ward
mike-ward / README.md
Last active December 18, 2018 12:46
AngularJS Demo using iTunes as a data source

iTunes browser in AngularJS

@mike-ward
mike-ward / ngChatExercise.html
Last active December 22, 2015 11:48
ngChat Exercise
<!DOCTYPE html>
<html lang="en">
<head>
<title>ngChat</title>
<!-- <link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.2.1/pure-min.css"> -->
<!-- <link rel="stylesheet" href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"> -->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<style type="text/css">
@mike-ward
mike-ward / PopupAllowKeyboardInput.cs
Last active December 23, 2015 17:59
Allow keyboard input in a WPF Popup control.
/*
Copyright (C) 2013 Mike Ward (http://mike-ward.net)
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:
@mike-ward
mike-ward / index.html
Last active December 25, 2015 19:49
Visualization of Code Mash Sessions in D3js
<!DOCTYPE html>
<html>
<head>
<title>Code Mash Sessions</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.3.0/pure-min.css">
<script src="http://cdnjs.cloudflare.com/ajax/libs/d3/3.3.3/d3.min.js" charset="utf-8"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.2.1/moment.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/lodash.js/2.2.1/lodash.min.js"></script>
<style type="text/css">
@mike-ward
mike-ward / Bundle.cs
Last active August 29, 2015 13:56
Simple Asset Bundling for NancyFx
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Nancy;
using Nancy.Helpers;
using Nancy.Responses;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Nancy;
using Nancy.Helpers;
using Nancy.Responses;
@mike-ward
mike-ward / StaticContentMinifyBundle.cs
Last active August 29, 2015 13:57
NancyFx StaticContentBundle with CSS and JavaScript minification. Requires Microsoft.s AjaxMin Nuget package. File monitors detect when cached files have changed.
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
using Microsoft.Ajax.Utilities;
using Nancy;
@mike-ward
mike-ward / .gitconfig
Last active February 18, 2021 16:27
My .gitconfig
[user]
name = mike-ward
email = [email protected]
[core]
autocrlf = true
editor = \"C:\\Program Files\\Notepad2\\Notepad2.exe\"
excludesfile = C:\\Users\\Mike\\Documents\\gitignore_global.txt
[alias]
st=status
co = checkout
@mike-ward
mike-ward / snippets.txt
Last active August 29, 2015 14:22
Markdown Edit Snippets
now $DATE("f")$ $END$
date $DATE("d")$ $END$
time $DATE("t")$ $END$
img ![$alt_text$]($image_url$) $END$
link [$link_text$]($link_url$) $END$
tm &trade;
cp &copy;
reg &reg;