Skip to content

Instantly share code, notes, and snippets.

@phusick
phusick / dabblet.css
Created April 12, 2012 11:36 — forked from jankorbel/dabblet.css
CSS animated loading dots
/*
CSS animated loading dots
*/
body
{
background: #5A5C64;
}
.loading_dots
define([
"dojo/_base/declare",
"dojo/string",
"dojo/query",
"dojo/parser",
"dijit/registry",
"dijit/layout/ContentPane",
"dojo/i18n!app/nls/main",
@phusick
phusick / main.js
Created February 9, 2013 00:11
Creating three instances of the CMS application (two of them i a dialog window).
require([ './EntryPoint', 'dijit/Dialog', 'dojo/domReady!' ],
function (EntryPoint, Dialog) {
app.entryPoint = new EntryPoint().placeAt(document.body);
app.entryPoint.startup();
launchInDialog(new EntryPoint());
launchInDialog(new EntryPoint());
function launchInDialog(application) {
var placeholder = document.createElement("div");
@phusick
phusick / hub.html
Created June 12, 2014 19:37
Event Hub
<html>
<head>
<title>Event Hub</title>
<script src="hub.js"></script>
<script>
var subscription = hub.subscribe('/go', function(params) {
console.log('one', params);
});
var subscription2 = hub.subscribe('/go', function(params) {
console.log('two', params);
(function() {
var root = angular.element(document.getElementsByTagName('html'));
var watchers = [];
var attributes = [];
var attributes_with_values = [];
var elements = {};
var elements_per_attr = [];
var scopes = [];
(function() {
var root = angular.element(document.getElementsByTagName('body'));
var watchers = 0;
var f = function(element) {
if (element.data().hasOwnProperty('$scope')) {
watchers += (element.data().$scope.$$watchers || []).length;
}
angular.forEach(element.children(), function(childElement) {
[
{
"expand": "full",
"id": 15393162815629,
"title": "12m:00s Test",
"description": "Run 12m:00s as fast as you can. The result will be used to adjust your training plan to better match your current fitness level",
"sport": 0,
"planned_date": "2015-04-28T22:00:00.000Z",
"duration": 1320,
"training_plan_id": 194,
{
"expand": "full",
"id": 526598275,
"sport": 1,
"start_time": "2015-05-21T07:38:48.000Z",
"distance": 1.5840059518814087,
"duration": 479,
"speed_avg": 11.904846402449,
"speed_max": 29.7818,
"altitude_min": 42,
{
"expand": "full",
"id": 526600591,
"sport": 1,
"start_time": "2015-05-21T07:45:25.000Z",
"distance": 0.8209999799728394,
"duration": 240.09,
"speed_avg": 12.310383305852897,
"speed_max": 19.2895,
"altitude_min": 0.5,
@phusick
phusick / esnextbin.md
Last active February 9, 2016 10:21
esnextbin sketch