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
protected override void ApplicationStartup(IWindsorContainer container, IPipelines pipelines) | |
{ | |
pipelines.BeforeRequest += (ctx) => | |
{ | |
if (ctx.Request.Session["TempMessage"] != null && !string.IsNullOrEmpty(ctx.Request.Session["TempMessage"] as string)) | |
{ | |
ctx.ViewBag.TempMessage = ctx.Request.Session["TempMessage"]; | |
ctx.ViewBag.TempType = ctx.Request.Session["TempType"]; | |
ctx.Request.Session.DeleteAll(); | |
} |
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 CustomBootstrapper : DefaultNancyBootstrapper | |
{ | |
protected override void ApplicationStartup(TinyIoCContainer container, IPipelines pipelines) | |
{ | |
pipelines.OnError += (ctx, exception) => | |
{ | |
ctx.Items.Add("OnErrorException", exception); | |
return null; | |
}; | |
} |
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
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
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
/* | |
* In my project I added the GUID to my implementation of IUserIdentity | |
* so I had access to it later by a simple cast. In Nancy you'd just want | |
* to fetch it the same way it's already done in the Before hook. | |
* | |
* Also note, I'm using my company's style guide, not Nancy's. | |
*/ | |
// This is a Drop in replacement for the after hook used by FormsAuth right now. |
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
/// <summary> | |
/// Contains extension methods for the <see cref="Expression"/> type. | |
/// </summary> | |
public static class ExpressionExtensions | |
{ | |
/// <summary> | |
/// Retrieves the member that an expression is defined for. | |
/// </summary> | |
/// <param name="expression">The expression to retreive the member from.</param> | |
/// <returns>A <see cref="MemberInfo"/> instance if the member could be found; otherwise <see langword="null"/>.</returns> |
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
app.directive('backButton', function(){ | |
return { | |
restrict: 'A', | |
link: function(scope, element, attrs) { | |
element.bind('click', goBack); | |
function goBack() { | |
history.back(); | |
scope.$apply(); |
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
function urlObject(options) { | |
"use strict"; | |
/*global window, document*/ | |
var url_search_arr, | |
option_key, | |
i, | |
urlObj, | |
get_param, | |
key, |
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
/* http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-new-image-replacement/ */ | |
overflow: hidden; | |
text-indent: 100%; | |
white-space: nowrap; |
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
// ----------------------------------------------------------------------------- | |
/* Shame CSS */ | |
// This is not a dumping ground. It is a staging area for hacks that are | |
// intended to be fixed and resolved so as not to sully our | |
// production-ready codebase. Hacks are necessary, but they are not | |
// permanent, nor are they acceptable long-term. You are not done when | |
// you've moved your selector and rules here. | |
// This is not intended to be an easy fix, or a simple way out. You will | |
// spend time writing out your shame, and you will make it known that |