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
{ | |
"locked": false, | |
"version": -9998, | |
"projectFileDependencyGroups": { | |
"": [ | |
"riakclient >= 2.1.0" | |
], | |
"DNX,Version=v4.5.1": [], | |
"DNXCore,Version=v5.0": [ | |
"System.Console >= 4.0.0-beta-*" |
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 class Settings | |
{ | |
public Settings() | |
{ | |
SomeString = Helpers.GetSetting("SomeString", "DefaultString"); | |
SomeInt = Helpers.GetSetting("SomeInt", 9, int.TryParse); | |
SomeTimeSpan = Helpers.GetSetting("SomeTimeSpan", new TimeSpan(60), Helpers.TimeSpanParser); | |
} | |
public string SomeString { get; set; } |
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
[TestFixture] | |
public class WhenCreatingANewUser | |
{ | |
private ConfigurableContext _configurableContext; | |
[TestFixtureSetUp] | |
public void Setup() | |
{ | |
_configurableContext = new ConfigurableContext<WriteContext>(x => | |
{ |
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
static void Main(string[] args) | |
{ | |
////////// Setup Elastic | |
var node = new Uri("http://localhost:9200"); | |
var settings = | |
new ConnectionSettings(node).SetDefaultIndex("fansz") | |
.MapDefaultTypeNames(m => m.Add(typeof(UserElastic), "users")); | |
var client = new ElasticClient(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
{ | |
"fansz": { | |
"aliases": {}, | |
"mappings": { | |
"users": { | |
"properties": { | |
"backgroundImage": { | |
"type": "string" | |
}, | |
"backgroundImageAspectRatio": { |
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
Set-ExplorerOptions - showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
Enable-RemoteDesktop | |
cinst steam | |
cinst googlechrome | |
cinst git | |
cinst 7zip | |
cinst atom | |
cinst skype | |
cinst nodejs |
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
[Fact] | |
public void SomeOtherReallyBadTest() | |
{ | |
var context = new ConfigurableContext<FooContext>(ctx => | |
{ | |
ctx.Setup(x => x.Users, new List<User>()); | |
}); | |
var subject = new Foo(configurableContext); //Note the implicit conversion | |
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.Collections.Generic; | |
using System.Linq; | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var container = new Container(); | |
container.Bind<ICar, Car>(); |
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 Nancy; | |
using Nancy.ModelBinding; | |
public class TurtleModule : NancyModule | |
{ | |
public TurtleModule() : base("/turtle") | |
{ | |
// Note: arguments can be named anything. | |
Get["/"] = arguments => | |
{ |
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
ko.bindingHandlers.date = { | |
update: function(element, valueAccessor, allBindingsAccessor) { | |
var value = ko.utils.unwrapObservable(valueAccessor()); | |
var allBindings = allBindingsAccessor(); | |
var format = allBindings.format || 'DD/MM/YYYY'; // default format. | |
if (value && value != 'Invalid Date') { | |
var formattedDate = moment(value).format(format); | |
if ($(element).is('input')) { |