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
// https://github.com/aspnet/AspNetIdentity/blob/master/src/Microsoft.AspNet.Identity.Core/AsyncHelper.cs | |
// Copyright (c) Microsoft Corporation, Inc. All rights reserved. | |
// Licensed under the MIT License, Version 2.0. See License.txt in the project root for license information. | |
using System; | |
using System.Globalization; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace Microsoft.AspNet.Identity |
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
require 'factory_girl' | |
require 'securerandom' | |
FactoryGirl.define do | |
factory :user do | |
haha SecureRandom.hex(10) | |
hehe 88 | |
end | |
end |
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
function Defer() { | |
this.promise = new Promise((resolve, reject) => { | |
this.resolve = resolve; | |
this.reject = this.reject; | |
}); | |
} | |
var promises = []; | |
var pipelineName = 'XXXXXXXX';//replace | |
for(let i = 0; i < 100; i+=10){ |
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
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2"> | |
<session-factory> | |
<property name="connection.provider">NHibernate.Connection.DriverConnectionProvider</property> | |
<property name="dialect">NHibernate.Dialect.MsSql2012Dialect</property> | |
<property name="connection.driver_class">NHibernate.Driver.SqlClientDriver</property> | |
<property name="connection.connection_string">Data Source=(LocalDB)\MSSQLLocalDB;AttachDbFilename="C:\Users\twer\Documents\Visual Studio 2015\Projects\ConsoleApplication3\ConsoleApplication3\Database1.mdf";Integrated Security=True</property> | |
<property name="show_sql">true</property> | |
</session-factory> | |
</hibernate-configuration> |
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
Add-Type @" | |
using System.Net; | |
using System.Security.Cryptography.X509Certificates; | |
public class TrustAllCertsPolicy : ICertificatePolicy { | |
public bool CheckValidationResult( | |
ServicePoint srvPoint, X509Certificate certificate, | |
WebRequest request, int certificateProblem) { | |
return true; | |
} | |
} |
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
angular.module('cbj', []) | |
.provider('singletonProvider', function() { | |
console.log('provider created'); | |
this.$get = function () { | |
console.log('provider $get called'); | |
return {provider: 1}; | |
}; | |
}) | |
.factory('singletonFactory', function() { | |
console.log('factory created'); |
#test markdown
this is a test of gist
NewerOlder