| API | Status Codes |
|---|---|
| [Twitter][tw] | 200, 304, 400, 401, 403, 404, 406, 410, 420, 422, 429, 500, 502, 503, 504 |
| [Stripe][stripe] | 200, 400, 401, 402, 404, 429, 500, 502, 503, 504 |
| [Github][gh] | 200, 400, 422, 301, 302, 304, 307, 401, 403 |
| [Pagerduty][pd] | 200, 201, 204, 400, 401, 403, 404, 408, 500 |
| [NewRelic Plugins][nr] | 200, 400, 403, 404, 405, 413, 500, 502, 503, 503 |
| [Etsy][etsy] | 200, 201, 400, 403, 404, 500, 503 |
| [Dropbox][db] | 200, 400, 401, 403, 404, 405, 429, 503, 507 |
This file contains hidden or 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
| public static class DapperExtensions | |
| { | |
| private static readonly IEnumerable<TimeSpan> RetryTimes = new[] | |
| { | |
| TimeSpan.FromSeconds(1), | |
| TimeSpan.FromSeconds(2), | |
| TimeSpan.FromSeconds(3) | |
| }; | |
| private static readonly AsyncRetryPolicy RetryPolicy = Policy |
This file contains hidden or 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
| # Description: Boxstarter Script | |
| # Author: Jess Frazelle <[email protected]> | |
| # Last Updated: 2017-09-11 | |
| # | |
| # Install boxstarter: | |
| # . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
| # | |
| # You might need to set: Set-ExecutionPolicy RemoteSigned | |
| # | |
| # Run this boxstarter by calling the following from an **elevated** command-prompt: |
This file contains hidden or 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
| public class ContextHelpers | |
| { | |
| public static UmbracoContext EnsureUmbracoContext() { | |
| if (UmbracoContext.Current != null) | |
| { | |
| return UmbracoContext.Current; | |
| } | |
| var httpContext = new HttpContextWrapper(HttpContext.Current ?? new HttpContext(new SimpleWorkerRequest("temp.aspx", "", new StringWriter()))); | |
This file contains hidden or 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.Web.Mvc; | |
| using Umbraco.Core; | |
| using Umbraco.Web.Mvc; | |
| namespace UmbMvcMiniProfiler | |
| { | |
| public class Bootstrapper : ApplicationEventHandler | |
| { | |
| protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) | |
| { |
This file contains hidden or 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
| After spending the better part of the month implementing date support | |
| in RethinkDB, Mike Lucy sent the team the following e-mail. It would | |
| have been funny, if it didn't cause thousands of programmers so much | |
| pain. Read it, laugh, and weep! | |
| ----- | |
| So, it turns out that we're only going to support dates between the | |
| year 1400 and the year 10000 (inclusive), because that's what boost | |
| supports. |
This file contains hidden or 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.Diagnostics; | |
| using System.Linq; | |
| using System.Reflection; | |
| [Serializable] | |
| [DebuggerDisplay("{DisplayName} - {Value}")] | |
| public abstract class Enumeration<TEnumeration, TValue> : IComparable<TEnumeration>, IEquatable<TEnumeration> | |
| where TEnumeration : Enumeration<TEnumeration, TValue> | |
| where TValue : IComparable |
This file contains hidden or 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.Linq; | |
| using System.Web.Http; | |
| using System.Web.Routing; | |
| using Umbraco.Core.Events; | |
| using Umbraco.Core.Models; | |
| using Umbraco.Core.Publishing; | |
| using umbraco.interfaces; | |
| namespace Site.EventHandlers | |
| { |
This file contains hidden or 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
| [AttributeUsage(System.AttributeTargets.All, AllowMultiple = true, Inherited = true)] | |
| public class ಠ_ಠAttribute : Attribute | |
| { | |
| public ILog Log { get; set; } | |
| public ಠ_ಠAttribute() | |
| { | |
| Log.Info("This code is bad and you should feel bad"); | |
| } | |
| } |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>My Site's Title</title> | |
| <script src="/Scripts/jquery-1.6.4.min.js" type="text/javascript"></script> | |
| <script src="/Scripts/jquery.signalR-0.5.2.min.js" type="text/javascript"></script> | |
| <script src="/SignalR/hubs" type="text/javascript"></script> |
NewerOlder