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
javascript: | |
var asdf = (window.getSelection && window.getSelection().toString()) || null; | |
if (!asdf || asdf === "") { | |
try { | |
asdf = document.getElementsByClassName('gh-header-title')[0].innerText | |
} catch (e) {} | |
} | |
if (!asdf) { | |
asdf = prompt("Enter the title"); |
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
<template> | |
<require from="./registration-form"></require> | |
<registration-form></registration-form> | |
</template> |
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 static IWebHost BuildWebHost(string[] args) | |
{ | |
var config = new ConfigurationBuilder() | |
.SetBasePath(Directory.GetCurrentDirectory()) | |
.AddJsonFile("appsettings.json"); | |
return WebHost.CreateDefaultBuilder(args) | |
.ConfigureAppConfiguration((context, builder) => { | |
builder.AddEntityFrameworkConfig(options => options.UseSqlServer(config.GetConnectionString("DefaultConnection"))); | |
}); |
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
# Issue Description | |
{Give a detailed description of the bug. Explain what occurred and the reasons the behavior is incorrect.} | |
# Steps to Reproduce. | |
1. X | |
1. Y | |
1. Z | |
# Expected Result: | |
{Concisely state the proper result. This should be no more than two sentences.} |
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 override int SaveChanges() | |
{ | |
ModifyBaseEntity(); | |
return base.SaveChanges(); | |
} | |
private void ModifyBaseEntity() | |
{ |
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
// ==UserScript== | |
// @name TFS online shortcuts | |
// @author Alex Dresko | |
// @namespace http://www.alexdresko.com | |
// @version 0.5 | |
// @description Some additional shortcuts for TFS online | |
// @match https://*.visualstudio.com/* | |
// @copyright 2014+, Alex Dresko | |
// @require 'http://code.jquery.com/jquery-1.11.1.min.js' | |
// @updateURL 'https://gist.githubusercontent.com/alexdresko/1ebd8ff2b1db2fe66c85/raw/tfsonlinekeyboardshortcuts.user.js' |
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
void Main() | |
{ | |
var dir = @"C:\temp\OptumFtp\Root\Extracted\"; | |
foreach (var file in Directory.GetFiles(dir, "*.txt")) | |
{ | |
var header = File.ReadAllLines(file)[0]; | |
var map = Regex.Replace(header, @"([^|]*).", @"Map(m => m.$1).Name(""$1""); | |
"); | |
var properties = Regex.Replace(header, @"([^|]*).", @"public string $1 { 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
var user = await UserManager.FindByNameAsync(model.UserName); | |
if (user != null) | |
{ | |
if (!await UserManager.IsEmailConfirmedAsync(user.Id)) return View(Mvc.Account.Views.ErrorNotConfirmed); | |
} | |
//var result = await SignInManager.PasswordSignInAsync(model.UserName, model.Password, model.RememberMe, shouldLockout: true); | |
var result = await SignInManager.SignInAsync(model.UserName, model.Password, model.RememberMe); |
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
var stringToCache = "tada!!!"; | |
var absoluteExpirationForCache = | |
DateTime.Now.AddSeconds(10); | |
var yeResult = (string) MemoryCache.Default | |
.AddOrGetExisting | |
("AnyOleKey", stringToCache, absoluteExpirationForCache); |
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
// ==UserScript== | |
// @name Soundy | |
// @namespace http://www.alexdresko.com/ | |
// @version 0.1 | |
// @description Plays some kind of noise whenever a matched page finishes loading | |
// @match https://localhost:44300/* | |
// @match https://gist.github.com/* | |
// @copyright 2014+, Alex Dresko | |
// ==/UserScript== |
NewerOlder