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 ActionResult SignIn(string returnUrl = null) | |
{ | |
if (returnUrl != null) | |
Response.StatusCode = (int)HttpStatusCode.Unauthorized; | |
return View(new SignInRequest { ReturnUrl = returnUrl }); | |
} |
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
<link rel="stylesheet" type="text/css" href="/cdn/css/basic.css?v=204r866" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/> | |
<link rel="stylesheet" media="only screen and (max-width: 960px)" href="/cdn/css/960.css" /> | |
<link rel="stylesheet" media="only screen and (max-width: 890px)" href="/cdn/css/890.css" /> | |
<link rel="stylesheet" media="only screen and (max-width: 750px)" href="/cdn/css/768.css" /> | |
<link rel="stylesheet" media="only screen and (max-width: 480px)" href="/cdn/css/480.css" /> |
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
(require '[clojure.core.async :as async :refer :all]) | |
(defn customer [i ch] | |
(go (>! ch i))) | |
(defn barber [ch] | |
(go (while true | |
(println "cuts hair of " (<! ch))))) | |
(let |
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 ComponentRegistration<TService> RouteFromName<TService>(this ComponentRegistration<TService> registration) | |
where TService : class | |
{ | |
return registration.Route(registration.Name); | |
} | |
public static ComponentRegistration<TService> Route<TService>(this ComponentRegistration<TService> registration, string name) | |
where TService : class | |
{ | |
var factory = new DefaultServiceHostFactory(); |
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
static string TryGetErrorMessage(XElement html) | |
{ | |
var errMessage = html.GetElementsByClassName("ErrorMessage").FirstOrDefault(); | |
var errText = html.GetElementsByClassName("ErrorText").FirstOrDefault(); | |
var errorMessage = String.Empty; | |
if (errMessage != null && (!errMessage.Attributes("style").Any() || (errMessage.Attributes("style").Any() && errMessage.Attributes("style").First().Value != "visibility:hidden;"))) | |
errorMessage = errMessage.Value.Trim(); | |
if (errText != null) | |
errorMessage = errText.Value.Trim(); | |
return errorMessage; |
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 Rebase-Tf { | |
git stash | |
git tf fetch | |
git rebase FETCH_HEAD | |
git stash pop | |
} |
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 PublishedAccount | |
{ | |
readonly DateTime publishedDate; | |
readonly Maybe<DateTime> publishedDateEnd; | |
readonly AccountTypeStandard standardAccount; | |
readonly AccountTypeNonstandard nonstandardAccount; | |
public PublishedAccount(DateTime publishedDate, Maybe<DateTime> publishedDateEnd, AccountTypeStandard standardAccount, AccountTypeNonstandard nonstandardAccount) | |
{ | |
this.publishedDate = publishedDate; |
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
Although great science is always the result of collaboration, keep in mind that, | |
like Albert Einstein and his cousin Terry, history will only remember one of you. |
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.Linq; | |
using Castle.MicroKernel; | |
using Castle.MicroKernel.Registration; | |
namespace Project.Installers { | |
public static class FeatureToggles { | |
static readonly string[] OnStates = { "on", "enabled" }; |
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
var typText = response.Descendants("typText").FirstOrDefault() != null | |
? response.Descendant("typText").Value.ToMaybe() | |
: null; |