Skip to content

Instantly share code, notes, and snippets.

View mmcgahan's full-sized avatar

Mike McGahan mmcgahan

View GitHub Profile
@mmcgahan
mmcgahan / api.py
Created July 20, 2012 18:30
Flask XML-RPC MetaWeblog+Wordpress API for MarsEdit
import string
from datetime import datetime
from flask import url_for
from flask.ext.xmlrpc import XMLRPCHandler, Fault
from labs import app, db
from labs.models import User, Post, Tag, Category
# MetaWeblogAPI XML-RPC
handler = XMLRPCHandler('api')
handler.connect(app, '/api')
@mmcgahan
mmcgahan / gist:9fa045d98c7c122f1c0b
Created June 18, 2014 19:09
Handlebars template inheritance
# Template composition with inclusion
Every template language I have seen provides some mechanism for one template to include another, thus supporting the reuse of repeated elements like headers and footers. The included templates are called partials in Mustache parlance:
```html
<!-- home.hbs -->
<html>
<body>
{{> header}}
<p> HOME </p>
{{> footer}}
@mmcgahan
mmcgahan / keybase.md
Created April 21, 2020 21:49
keybase.md

Keybase proof

I hereby claim:

  • I am mmcgahan on github.
  • I am drmike (https://keybase.io/drmike) on keybase.
  • I have a public key ASCqTkcpWs4Hzk-_LTBH1n1kqtdM3V1ykY0R8xuYkh2eGwo

To claim this, I am signing this object:

@mmcgahan
mmcgahan / keybase.md
Last active April 21, 2020 21:47
keybase.md

drmike Mike McGahan Wellington, New Zealand

Keybase proof

I hereby claim:

  • I am mmcgahan on github.
  • I am drmike (https://keybase.io/drmike) on keybase.
  • I have a public key ASCqTkcpWs4Hzk-_LTBH1n1kqtdM3V1ykY0R8xuYkh2eGwo
@mmcgahan
mmcgahan / mup-web-build-diagram.md
Last active August 3, 2019 00:44
Gantt chart for mup-web build (3 August 2019)
gantt
dateFormat  mm:ss
axisFormat  %M:%S
title mup-web build

section unit test
install               : 00:00, 95s
run unit tests        :        640s
sync github+coveralls :        20s
@mmcgahan
mmcgahan / fedx-roadmap.md
Last active August 1, 2019 01:19
FEDX working group roadmap diagram markup
gantt
dateFormat M-DD
axisFormat %e %b
title FEDX roadmap

section build optimization
remove install            : crit, rm-i,         7-12,              1w
reduce Docker             : crit, min-docker,   7-17,              2w
parallel push             : crit, p-push,       7-17,              4d
@mmcgahan
mmcgahan / mup-web-build-theoretical.md
Last active July 9, 2019 21:48
Build pipeline with all optimizations
gantt
dateFormat  mm:ss
axisFormat  %M:%S
title mup-web build

section current
current build : done, 00:00, 60m

section prep
const path = require('path');
const webpack = require('webpack');
const ManifestPlugin = require('webpack-manifest-plugin');
const StatsPlugin = require('webpack-stats-plugin').StatsWriterPlugin;
const SWPrecacheWebpackPlugin = require('sw-precache-webpack-plugin');
const { env, paths } = require('mwp-config');
const prodPlugins = require('./prodPlugins');
const rules = require('./rules');
@mmcgahan
mmcgahan / table.md
Last active December 18, 2018 19:41
Path Component Query
/ AppContainer (query requires specific params)
(query requires specific params)
/bookspace BookSpaceComponent members/self
noop
/bookspace/* Error404Component members/self
noop
/account none members/self
noop
/account/redesign RedesignRedirect members/self
noop
/account/* Error404Component members/self
noop
/about none members/self
noop
/about/hostatwework: (no wrapper component - TODO get index)
Path Component Query
/ AppContainer (query requires specific params)
(query requires specific params)
/account none members/self
noop
/account/redesign RedesignRedirect members/self
noop
/account/* Error404Component members/self
noop
/about none members/self
noop
/about/hostatwework: (no wrapper component - TODO get index)
/about/* Error404Component members/self
noop
/media: (no wrapper component - TODO get index)