(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| angular.module('stateMock',[]); | |
| angular.module('stateMock').service("$state", function($q){ | |
| this.expectedTransitions = []; | |
| this.transitionTo = function(stateName, params){ | |
| if(this.expectedTransitions.length > 0){ | |
| var expectedState = this.expectedTransitions.shift(); | |
| if(expectedState.stateName !== stateName){ | |
| throw Error('Expected transition to state: ' + expectedState.stateName + ' but transitioned to ' + stateName ); | |
| } | |
| if(expectedState.params && !angular.equals(expectedState.params, params)){ |
| /* | |
| * vg-bkg-size | |
| * A Videogular plugin to emulate background-size CSS property for video: "cover" or "contain" | |
| * | |
| * Use: | |
| * <videogular vg-bkg-size="cover" center="true"></videogular> | |
| * vg-bkg-size => "cover" or "contain" | |
| * center => true or false | |
| * | |
| * Copyright (c) 2014 Panurge Web Studio |
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| var crypto = require('crypto'); | |
| /** | |
| * Generates and returns a Freshdesk Single Sign On URL | |
| * {@link https://gist.github.com/derekseymour/26a6fe573c1274642976 Gist} | |
| * | |
| * @author Derek Seymour <[email protected]> | |
| * @param {String} name - The name of the user logging in. | |
| * @param {String} email - A valid email address to associate with the user. |
| angular.module('stateMock',[]); | |
| angular.module('stateMock').service("$state", function($q){ | |
| this.expectedTransitions = []; | |
| this.transitionTo = function(stateName){ | |
| if(this.expectedTransitions.length > 0){ | |
| var expectedState = this.expectedTransitions.shift(); | |
| if(expectedState !== stateName){ | |
| throw Error("Expected transition to state: " + expectedState + " but transitioned to " + stateName ); | |
| } | |
| }else{ |
| directives.directive('twitter', [ | |
| function() { | |
| return { | |
| link: function(scope, element, attr) { | |
| setTimeout(function() { | |
| twttr.widgets.createShareButton( | |
| attr.url, | |
| element[0], | |
| function(el) {}, { | |
| count: 'none', |
| /** | |
| * Retrieves all the rows in the active spreadsheet that contain data and logs the | |
| * values for each row. | |
| * For more information on using the Spreadsheet API, see | |
| * https://developers.google.com/apps-script/service_spreadsheet | |
| */ | |
| function readRows() { | |
| var sheet = SpreadsheetApp.getActiveSheet(); | |
| var rows = sheet.getDataRange(); | |
| var numRows = rows.getNumRows(); |
| # DO NOT RESPOND TO REQUESTS OTHER THAN yourdomain.com | |
| server { | |
| listen 80 default; | |
| server_name _; | |
| return 444; | |
| } | |
| # FILE UPLOADS | |
| server { | |
| listen 80; |