Skip to content

Instantly share code, notes, and snippets.

View makeusabrew's full-sized avatar
💭
I may be slow to respond.

Nick Payne makeusabrew

💭
I may be slow to respond.
View GitHub Profile
Given a tree structure which indicates some level of inheritance / dependency with
some concrete objects at the end of the tree e.g.
src/
adapter/
mocha/
coffeescript.js
javascript.js
Assume that at each level of the tree (excluding src) there is a relevant 'base'
@makeusabrew
makeusabrew / schedule.md
Last active December 24, 2015 21:19
Marathon taper - last two weeks

Garmin Connect Level II Marathon training - final 2 weeks

The following schedule is lifted directly from Garmin Connect's "intermediate" marathon training plan.

Marathon date: Sunday 20th October

Penultimate week

  • Tuesday 8th: Intervals (10m warmup, 5m:1m threshold:recovery x6 = 46m)
  • Thursday 10th: Threshold run (25m easy, 25 threshold, 25 easy = 1h15m)
@makeusabrew
makeusabrew / bootbox-setDefaults-v4.js
Last active May 7, 2018 01:05
Bootbox v4.0.0 defaults
bootbox.setDefaults({
/**
* @optional String
* @default: en
* which locale settings to use to translate the three
* standard button labels: OK, CONFIRM, CANCEL
*/
locale: "fr",
/**
@makeusabrew
makeusabrew / bootbox-dialog-v4-all.js
Last active April 18, 2018 18:52
An attempt to demonstrate as many bootbox.dialog options as sanely possible in a single-file gist.
bootbox.dialog({
/**
* @required String|Element
*/
message: "I am a custom dialog",
/**
* @optional String|Element
* adds a header to the dialog and places this text in an h4
*/
bootbox.dialog({
message: "I am a custom dialog",
title: "Custom title",
buttons: {
success: {
label: "Success!",
className: "btn-success",
callback: function() {
Example.show("great success");
}
@makeusabrew
makeusabrew / modal.html
Created August 24, 2013 09:50
Twitter Bootstrap 3.0.0 - basic dialog box invocation via JavaScript
<!-- set up the modal to start hidden and fade in and out -->
<div id="myModal" class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<!-- dialog body -->
<div class="modal-body">
<button type="button" class="close" data-dismiss="modal">&times;</button>
Hello world!
</div>
<!-- dialog buttons -->
@makeusabrew
makeusabrew / usage.js
Last active April 3, 2019 03:17
Potential Bootbox v4.x API and usage examples
/**
* alert
*/
bootbox.alert("Hello world");
bootbox.alert("Hello world", function() {
console.log("dialog dismissed with OK or escape button");
});
bootbox.alert({
@makeusabrew
makeusabrew / key-indent.js
Created January 4, 2013 09:41
Various object key / val alignment styles
// 1) colon aligned, no spaces where possible
var Foo = {
host :"foo",
db :"bar",
details:"baz"
};
// 2) colon aligned, space after key
var Foo = {
host : "foo",
@makeusabrew
makeusabrew / usage-3.x.x.html
Last active November 14, 2016 09:59
Bootbox 3.0.0 sample usage
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My page</title>
<!-- CSS dependencies -->
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
</head>
<body>
@makeusabrew
makeusabrew / index.html
Created December 12, 2012 17:13
Garmin Connect - website down page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Garmin Connect</title>
<link href="site-maintenance.css" rel="stylesheet" type="text/css" />
</head>
<body>