Skip to content

Instantly share code, notes, and snippets.

@vadymberkut
vadymberkut / ASP NET MVC Using wwwroot static files.txt
Created June 21, 2017 09:24
ASP NET MVC Using wwwroot static files
Create a new ASP.NET 4.5 project in VS2015, selecting the Empty Template
Add OWIN references through nuget (Install-Package Microsoft.Owin.Host.SystemWeb and Microsoft.Owin.StaticFiles)
Add a startup file similar to this:
[assembly: OwinStartup(typeof(MyApp.Startup))]
namespace MyApp.UI
{
public class Startup
{
public void Configuration(IAppBuilder app)
@vadymberkut
vadymberkut / AspNetCore Auth config.txt
Created March 28, 2017 09:08
AspNetCore Auth config
COOKIE AUTH
//Auth
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AutomaticAuthenticate = true,
AutomaticChallenge = true,
LoginPath = new PathString("/Account/Login"),
Events = new CookieAuthenticationEvents()
{
http://localhost:1941/.well-known/openid-configuration
@vadymberkut
vadymberkut / ex
Created December 1, 2016 12:06
ex
FCT 01.12.2016 0.002802 73.48726981 0.20591133
Dotnet EF Migrations
dotnet ef migrations add {MigrationName}
dotnet ef migrations remove
dotnet ef database update
dotnet ef migrations add InitialIdentityServerMigration -c PersistedGrantDbContext
dotnet ef migrations add InitialIdentityServerMigration -c ConfigurationDbContext
dotnet ef migrations add InitialIdentityServerMigration -c ApplicationDbContext
@vadymberkut
vadymberkut / SQLServerExpressConfig.txt
Last active November 3, 2016 15:15
SQLServerExpressConfig
#MANAGEMENT STUDIO SERVER NAME
.\SQLEXPRESS
tcp:medilync-ukwest-db.database.windows.net,1433
#LOCAL SERVER CONNECTION STRING
"Data Source=.\\SQLEXPRESS;Initial Catalog=MedilyncSharingDb;Integrated Security=True;Connect Timeout=30;Encrypt=True;Trusted_Connection=True;TrustServerCertificate=True;MultipleActiveResultSets=true"
@vadymberkut
vadymberkut / git_set_user.bat
Created October 7, 2016 09:57
git set user
git config user.name "Andrew"
git config user.email "kylia669@gmail.com"
@vadymberkut
vadymberkut / js-module.js
Created September 28, 2016 18:49
js-module
var MyModule = (function(){
function _log() {
console.log(arguments);
}
function _warn(){
console.warn(arguments);
}