Skip to content

Instantly share code, notes, and snippets.

mike-ward / MessageBox.xaml
Created February 20, 2022 14:55
Avalonia MessageBox
mike-ward / scoop-apps.cmd
Created January 17, 2022 14:58
Scoop script to install apps
scoop install 7zip
scoop install deno
scoop install fiddler
scoop install fileoptimizer
scoop install filezilla
scoop install fx
scoop install gh
scoop install gow
scoop install gping
scoop install inno-setup
mike-ward / ospec.d.ts
Last active June 5, 2019 20:31
Naive ospec.js defintion file
// Type definitions for ospec 1.4
// Project:
// Definitions by: Tomek Łaziuk <>
// Definitions:
// TypeScript Version: 2.3
declare namespace ospec {
interface Assertion {
equals: AssertionFn;
notEquals: AssertionFn;
mike-ward / Note taking script
Last active April 12, 2018 13:25
Quick batch file to save notes to myself
@echo off
set notes=c:\users\mike\documents\google\notes.txt
if %1@==@ (
if exist %notes% sort /R %notes% | more
goto :eof
echo %date% %time:~0,5%, %*>>%notes%
mike-ward / pandoc-syntax-styles.css
Last active September 7, 2016 23:16
Default styles used by pandoc
<!-- Default MDE syntax style -->
<style type="text/css">
code { font-family: consolas, monospace; background-color: #f7f7f7; padding: .2pt; border-radius: 2pt; line-height: 1.3; }
pre { background-color: transparent; }
pre code { font-size: 95%; padding: 12pt; display: block; border-radius: 2pt; }
<!-- pygments -->
<style type="text/css">
mike-ward / index.html
Last active August 8, 2016 18:00
Mithril Markdown editor with debounce (using Mithril rewrite branch)
<!doctype html>
<title>Markdown Editor</title>
html,body {height:100%;margin:0;}
h1,h2,h3,h4,h5,h6,p {margin:0 0 10px;}
#editor {display:flex;height:100%;}
.editor-input,.editor-preview {box-sizing:border-box;height:100%;margin:0;padding:10px;width:50%;}
.editor-input {border:0;border-right:1px solid #ccc;outline:none;resize:none;}
mike-ward / NancyGzipCompression.cs
Created April 13, 2016 12:50
Enable gzip compression for assets in NancyFx
using System.Collections.Generic;
using System.IO.Compression;
using System.Linq;
using Nancy;
using Nancy.Bootstrapper;
namespace SendExplorerPlus.Portal.Utilities
public class NancyGzipCompression : IApplicationStartup
mike-ward / external_scripts.js
Created November 27, 2015 18:59
Markdown Edit Template and Scripts for displaying Math
// Avoid undefined script pop up messages by prefacing with window.
window.document.addEventListener("previewUpdated", function () {
if (window.MathJax) {
window.MathJax.Hub.Queue(["Typeset", window.MathJax.Hub]);
mike-ward /
Last active September 14, 2015 18:44
Exports Issues from a specified repository to a CSV file
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
import csv
import requests