Skip to content

Instantly share code, notes, and snippets.

@kbailles
kbailles / isc-messages-data-helper-test.html
Last active September 26, 2018 11:33
Polymer TDD example
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<script src="../../test-fixture/test-fixture-mocha.js"></script>
@kbailles
kbailles / blue-potential-test.html
Last active October 14, 2015 00:47
blue-potential TDD
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
<script src="../../web-component-tester/browser.js"></script>
<script src="../../test-fixture/test-fixture-mocha.js"></script>
@kbailles
kbailles / arc.html
Created October 14, 2015 21:18
d3 Arc TDD
<link rel="import" href="../polymer/polymer.html">
<script src="../d3/d3.min.js"></script>
<dom-module id="blue-arc-graph">
<style>
:host {
display: block;
}
</style>
@kbailles
kbailles / popup.ts
Created March 17, 2016 15:16
How I implement Angular directives in TypeScript
module insite_admin {
"use strict";
declare var Tether;
export interface IPopupChannel {
togglePopup(element: HTMLElement): void;
onTogglePopup(scope: ng.IScope, handler: Function): void;
}
export class PopupChannel implements IPopupChannel {
@kbailles
kbailles / ipc.client.js
Created July 28, 2016 15:10
Sample node module with tests
const chokidar = require('chokidar');
const fs = require('fs');
const _ = require('lodash');
const uuid = require('node-uuid');
const messageTypes = require('./message.types.js');
const basePath = '/ProgramData/XDMessagingv4/';
const screensaverPath = '/FitnessOnDemand/Resources/Images/Screensaver'
var heartbeatTimer;
@kbailles
kbailles / sample.html
Created August 10, 2016 18:49
Look at this
<form (ngSubmit)="save()" #projectForm="ngForm">
<div>
<input [(ngModel)]="project.name"
required
name="name"
#name="ngModel">
</div>
<div [hidden]="name.valid || name.pristine" class="alert">
Name is required
</div>