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
/* | |
* Password Hashing With PBKDF2 (http://crackstation.net/hashing-security.htm). | |
* Copyright (c) 2013, Taylor Hornby | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* 1. Redistributions of source code must retain the above copyright notice, | |
* this list of conditions and the following disclaimer. |
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
// get the password from the user | |
var clearTextPassword = "Passw0rd"; | |
// create the password hash | |
var passwordHash = PasswordHash.CreateHash(clearTextPassword); | |
// store the password hash in a data store | |
// ... | |
// (later when the user tries to login) |
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
public abstract class UiControllerBase : Controller | |
{ | |
private readonly ILog _log; | |
protected UiControllerBase(ILog log) | |
{ | |
_log = log; | |
} | |
internal string LoggedInUsername |
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.Runtime.CompilerServices; | |
namespace Insiders.Web.Infrastructure.Logging.Interfaces | |
{ | |
public interface ILog | |
{ | |
void Debug(string message, [CallerMemberName] string memberName = ""); | |
void Debug(object data, [CallerMemberName] string memberName = ""); |
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 Insiders.Web.Infrastructure.Logging.Interfaces; | |
using Insiders.Web.Infrastructure.Stats.Interfaces; | |
using Newtonsoft.Json; | |
using RollbarSharp; | |
using System.Runtime.CompilerServices; | |
namespace Insiders.Web.Infrastructure.Logging.Implementation | |
{ | |
public class RollbarLogger : ILog | |
{ |
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.Configuration; | |
using Insiders.Web.Infrastructure.Logging.Implementation; | |
using Insiders.Web.Infrastructure.Logging.Interfaces; | |
using Insiders.Web.Infrastructure.Stats.Implementation; | |
using Insiders.Web.Infrastructure.Stats.Interfaces; | |
using StructureMap; | |
using StructureMap.Graph; | |
namespace Insiders.Web.Infrastructure.IoC | |
{ |
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 Microsoft.Practices.ServiceLocation; | |
using StructureMap; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
namespace Insiders.Web.Infrastructure.IoC | |
{ | |
public class StructureMapDependencyResolver : ServiceLocatorImplBase |
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
import {HttpClient} from 'aurelia-http-client'; | |
import {Router} from 'aurelia-router'; | |
import {Config} from './my-configurations'; | |
import humane from 'humane'; | |
export class Support { | |
static inject() { return [HttpClient, Router, Config]; } | |
constructor(http, router, config){ | |
this.heading = 'Get In Touch'; | |
this.fullName = ''; |
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
package main | |
import ( | |
"log" | |
"net/http" | |
"os" | |
) | |
func main() { |
OlderNewer