Skip to content

Instantly share code, notes, and snippets.

View christopherthielen's full-sized avatar

Chris Thielen christopherthielen

View GitHub Profile
// ==UserScript==
// @name Teamflow FPS tweak
// @namespace http://tampermonkey.net/
// @version 0.3
// @description Adjust min/max FPS in Teamflow
// @author Chris Thielen
// @match https://app.teamflowhq.com/netflix*
// @grant none
// ==/UserScript==
"use strict";
exports.__esModule = true;
var angular = require("angular");
var ngModule = angular.module('ct.ui.router.extras.previous', ['ct.ui.router.extras.core', 'ct.ui.router.extras.transition']);
function PreviousStateService($state, $q, $transitions) {
var previous = null;
var lastPrevious = null;
var memos = {};
$transitions.onStart({}, function ($transition$) {
var fromState = $transition$.from().$$state();
@christopherthielen
christopherthielen / package.json
Created May 24, 2017 18:17
warningsFilter only effective when `sourceMap` option is truthy
{
"devDependencies": {
"webpack": "^2.6.0"
}
}
@christopherthielen
christopherthielen / gist:1a27f76c352e97d871cd726d0a4f2efd
Created February 24, 2017 03:07
ui-router-ng2 beta.5 prerelease
/**
* State-based routing for Angular 2
* @version v1.0.0-beta.5
* @link https://ui-router.github.io/ng2
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('rxjs/ReplaySubject'), require('rxjs/BehaviorSubject'), require('rxjs/observable/of'), require('rxjs/observable/fromPromise'), require('rxjs/observable/combineLatest'), require('rxjs/operator/switchMap'), require('rxjs/operator/mergeMap'), require('rxjs/operator/map'), require('rxjs/operator/concat'), require('rxjs/Observable'), require('rxjs/operator/concatAll'), require('rxjs/operator/every'), require('rxjs/operator/last'), require('rxjs/operator/mergeAll'), require('rxjs/add/operator/mergeMap'), require('rxjs/add/operator/map')) :
typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@angular/common', 'rxjs/ReplaySubject', 'rxjs/Behavi
@christopherthielen
christopherthielen / ui-router-ng2.js
Created September 21, 2016 16:58
ui-router-ng2 beta.3 pr2
/*!
* State-based routing for Angular 2
* @version v1.0.0-beta.3
* @link https://ui-router.github.io
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory(require("@angular/core"), require("rxjs/Rx"), require("@angular/common"));
else if(typeof define === 'function' && define.amd)
@christopherthielen
christopherthielen / angular-ui-router.js
Created September 19, 2016 15:23
angular-ui-router 1.0.0-beta.3-pr1
/*!
* State-based routing for AngularJS
* @version v1.0.0-beta.2
* @link https://ui-router.github.io
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
class OtherwiseRouterProvider {
constructor($urlRouterProvider) {
this.otherwiseRouters = [];
this.$urlRouterProvider = $urlRouterProvider;
}
registerRouter(func) {
this.otherwiseRouters.unshift(func);
return this;
}
@christopherthielen
christopherthielen / gist:c275b656f5b8bee81d327a68c809aa7b
Created June 24, 2016 14:49
Pending StateDeclaration changes
/** @module state */ /** for typedoc */
import {ParamDeclaration} from "../params/interface";
import {State} from "./stateObject";
import {ViewContext} from "../view/interface";
import {IInjectable} from "../common/common";
import {Transition} from "../transition/transition";
import {TransitionStateHookFn} from "../transition/interface";
import {ResolvePolicy, ResolvableLiteral} from "../resolve/interface";
import {Resolvable} from "../resolve/resolvable";
@christopherthielen
christopherthielen / show-current-browser-url.js
Last active July 20, 2016 17:15
show-current-browser-url.js: JS to show the current URL at the bottom of the window
; // <script src="//npmcdn.com/show-current-browser-url"></script>
(function() {
var div = document.createElement("div")
div.id = "document_location";
div.style.position = "fixed";
div.style.top = "0";
div.style.left = "0";
div.style.right = "0";
div.style.height = "20px;";
// contact is a RevertableModel which is injected from the state's resolve data.
export class EditContactController{
constructor($state, dialogService, Contacts, contact) {
this.$state = $state;
this.dialogService = dialogService;
this.Contacts = Contacts;
this.contact = contact.editableModel;
this.clearDirty = () => contact.clearDirty();
}