This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Runs the given delegate up to N times before throwing an exception, | |
/// if the thrown exception matches a given criteria (retryCondition). | |
/// </summary> | |
/// <typeparam name="T">The return type of the delegate.</typeparam> | |
/// <param name="numberOfRetries">The number of retries.</param> | |
/// <param name="operation">The delegate to be executed.</param> | |
/// <param name="retryCondition">A predicate that when evaluated indicates whether the action should be retried.</param> | |
/// <param name="onRetryAction">An action to be executed before executing the retry.</param> | |
/// <param name="onErrorAction">An action to be executed before the last chance of the exception is thrown.</param> | |
/// <returns>The result of the operation.</returns> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Data.Services.Client; | |
using System.Net; | |
public static class ExceptionRetriableExtension | |
{ | |
/// <summary> | |
/// Retry on all exceptions except 2xx, 3xx, 4xx | |
/// The 2xx is there for Table batch operations in which teh status code can be 202 even when |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MailChimpAPI = require('mailchimp').MailChimpAPI; | |
var crypto = require('crypto') | |
, mongoose = require('mongoose') | |
, _ = require('underscore'); | |
var Schema = mongoose.Schema, ObjectId = Schema.ObjectId; | |
var InvitationType = new Schema({ | |
key : ObjectId, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
goog.provide("murally.SampleClass"); | |
goog.require("murally.SomeParentClass"); | |
/** | |
* @constructor | |
* @param {string} name | |
* @extends {murally.SomeParentClass} | |
*/ | |
murally.SampleClass = function(name) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
murally.SomeClass.prototype.onRemoteResponse = function(response) { | |
var value = response.anything; | |
/** vs */ | |
var value = response["anything"]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2011 The Closure Compiler Authors. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zephyr:murally johnny$ git azure init --serviceName murally --force | |
Starting at Tue Jun 19 2012 18:45:18 GMT-0300 (ART) | |
Running with the following configuration: | |
Windows Azure service settings | |
serviceName: murally | |
subscription: undefined | |
publishSettings: /Users/johnny/Downloads/johnnyhalife.publishsettings | |
serviceLocation: East US | |
instances: 1 | |
Windows Azure storage settings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var types = {}; | |
types["dynamic"] = value; | |
types["fixed 1"] = 1; | |
types["fixed 2"] = 5; | |
return (types[type] || 0); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd $WORKSPACE #=> step on the workspace | |
git clean -xdf | |
rm -rf ./package | |
# UPDATE PACKAGE JSON VERSION | |
APP_VERSION=$(cat $WORKSPACE/package.json | grep version | echo "$(grep -o '[0-9]\.[0-9]\.')$BUILD_NUMBER") | |
sed -e "s|\"version\": \".*\"|\"version\": \"$APP_VERSION\"|g" package.json > new.file | |
mv new.file package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt){ | |
// Google Closure Tools for Grunt | |
grunt.loadNpmTasks('grunt-closure-tools'); | |
grunt.initConfig({ | |
/** Minification using Uglify.js **/ | |
concat: { | |
/** External Dependencies **/ | |
external: { | |
src: ['./static/js/lib/jquery.1.7.1.min.js', './static/js/lib/jquery-ui.1.8.14.min.js', './static/js/lib/iscroll.js', './static/js/lib/browserDetect.js', './static/js/lib/json2.js', './static/js/lib/color.js', './static/js/lib/scrollfix.js', './static/js/lib/querystring-0.9.0-min.js', './static/js/lib/jquery-plugin/jquery.ui.ipad.js', './static/js/lib/jquery-plugin/jquery.tapandhold.js', './static/js/lib/jquery-plugin/transform.js', './static/js/lib/jquery-plugin/jgestures.js', './static/js/lib/jquery-plugin/jquery.qtip-1.0.0-rc3.js', './static/js/lib/px-loader/PxLoader.js', './static/js/lib/px-loader/PxLoaderImage.js', './static/js/lib/jquery-plugin/jquery.imageLoaded.js', './static/js/lib/jquery-plugin/jquery.infinitescroll.min.js', './static/js/lib/shadowbox.js', './st |