Skip to content

Instantly share code, notes, and snippets.

Adam Gordon icfantv

Block or report user

Report or block icfantv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View twilight-zone.ts
const events: any = {
'addEventListener:scroll': true,
'addEventListener:mouseenter': false,
'addEventListener:mouseleave' : false,
'addEventListener:mousemove': true,
};
// const twilightZone = Zone.current.fork(Zone['wtfZoneSpec']).fork({
const twilightZone = Zone.current.fork({
name: 'twilight',
View tsconfig.json
{
"buildOnSave": false,
"compileOnSave": true,
"compilerOptions": {
"allowJs": false,
"baseUrl": "app/scripts/modules",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"lib": [
"es2016",
View app.module.ts
import {NgModule, Type} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {UpgradeModule, downgradeInjectable} from '@angular/upgrade/static';
import {SPINNAKER_DOWNGRADES} from './modules';
declare let angular: any;
const providers: Type<any>[] = [];
SPINNAKER_DOWNGRADES.forEach((item) => {
providers.push(item.moduleClass);
View ExecutionWindowDayPickerController.html
<div class="btn-group">
<label class="btn btn-default" ng-model="dayPicker.dayModel.sunday" uib-btn-checkbox>Sun</label>
<label class="btn btn-default" ng-model="dayPicker.dayModel.monday" uib-btn-checkbox>Mon</label>
<label class="btn btn-default" ng-model="dayPicker.dayModel.tuesday" uib-btn-checkbox>Tue</label>
<label class="btn btn-default" ng-model="dayPicker.dayModel.wednesday" uib-btn-checkbox>Wed</label>
<label class="btn btn-default" ng-model="dayPicker.dayModel.thursday" uib-btn-checkbox>Thu</label>
<label class="btn btn-default" ng-model="dayPicker.dayModel.friday" uib-btn-checkbox>Fri</label>
<label class="btn btn-default" ng-model="dayPicker.dayModel.saturday" uib-btn-checkbox>Sat</label>
</div>
<div class="button-controls">
View karma.conf.js
module.exports = function(config) {
config.set({
basePath: '',
frameworks: ['jasmine'],
files: [
// For travis
'node_modules/core-js/client/shim.js',
View ExportListComponent.html
<h1>Export Records</h1>
<div *ngIf="exports.length === 0">
This system has no export records created.
</div>
<div *ngIf="exports.length > 0">
<table class="table table-fixedheader export-grid">
<thead>
<tr>
<th *ngFor="let header of headers; let i = index" [ngClass]="columnWidths[i]">
<div class="no-select"
@icfantv
icfantv / karma-shim.js
Created Jul 19, 2016
Build Configuration
View karma-shim.js
Error.stackTraceLimit = Infinity;
require('es6-shim');
require('reflect-metadata');
require('ts-helpers');
require('zone.js/dist/zone');
require('zone.js/dist/long-stack-trace-zone');
require('zone.js/dist/jasmine-patch');
@icfantv
icfantv / SisService.spec.ts
Created Jul 13, 2016
ng2 Service Test (RC4)
View SisService.spec.ts
import {Injector, ReflectiveInjector} from '@angular/core';
import {HTTP_PROVIDERS, Response, ResponseOptions, XHRBackend} from '@angular/http';
import {MockBackend, MockConnection} from '@angular/http/testing';
import {ISisConsumer} from '../models';
import {TestSisConsumerGenerators} from '../test/TestSisConsumerGenerators';
import {SisService} from './SisService';
describe('test the sis consumer service', () => {
let injector: Injector;
View mapToIterable.js
from @amcdnl
import { Pipe } from 'angular2/core.js';
/**
* Map to Iteratble Pipe
*
* It accepts Objects and [Maps](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)
*
* Example:
View github_api.ts
import {Injectable} from 'angular2/core';
import {Http} from 'angular2/http';
import {Observable} from 'rxjs/Observable';
import 'rxjs/add/operator/map';
const GITHUB_API_URL = 'https://api.github.com';
export class Repository {
name: string;
full_name: string;
You can’t perform that action at this time.