Skip to content

Instantly share code, notes, and snippets.

@mttmccb
mttmccb / another-home.html
Last active October 23, 2017 12:08 — forked from jdanyow/app.html
canDeactivate check
<template>
<h1>Another home</h1>
<p>The grass is not greener <a route-href="route: home">take me back</a>.</p>
</template>
@mttmccb
mttmccb / sample.ts
Last active September 26, 2017 18:18 — forked from chanakaDe/sample.ts
import {autoinject} from 'aurelia-framework';
import {HttpClient} from "aurelia-fetch-client";
import {Steam} from './steam';
import {BaseI18N, I18N} from 'aurelia-i18n';
import {EventAggregator} from 'aurelia-event-aggregator';
@autoinject()
export class Producers extends BaseI18N {
producers = 'Producers Page!';
@mttmccb
mttmccb / app.html
Last active January 28, 2017 23:13 — forked from jdanyow/app.html
Aurelia Ref Width
<template>
<div ref="appcontainer" style="width: 150px; border: 1px solid red;">
<p>App width is ${elementwidth}</p>
<p>div width is ${divwidth}</p>
</div>
</template>
@mttmccb
mttmccb / app.html
Created January 18, 2017 09:32 — forked from Thanood/app.html
Aurelia-Materialize bridge select bind onjects
<template>
<div>
<select md-select value.two-way="selectedMeal">
<option disabled selected>Select your meal</option>
<option repeat.for="meal of food" model.bind="meal">${meal.name}</option>
</select>
<a md-button="flat: true;" md-waves click.trigger="setSelectedMeal()" class="accent-text">select steak</a>
You selected: ${selectedMeal | stringify}
</div>
@mttmccb
mttmccb / import.rb
Last active December 14, 2016 21:50 — forked from spiffytech/import.rb
Imports a Squarespace dump into Jekyll
# coding: utf-8
require 'rubygems'
require 'nokogiri'
require 'fileutils'
require 'safe_yaml'
require 'time'
require 'uri'
require 'open-uri'
@mttmccb
mttmccb / countries.sql
Created September 23, 2015 07:39 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;