This file contains hidden or 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
| namespace CSI.ESS.ServiceModel.Contracts | |
| { | |
| using System; | |
| using System.ComponentModel; | |
| using System.Runtime.InteropServices; | |
| using System.Security.Principal; | |
| /// <summary> | |
| /// This class manages the creation of an impersonation to the Application | |
| /// Pool's context for a defined scope. |
This file contains hidden or 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
| Sub GetSublimeTextKeyBindings() | |
| Dim cmd As Command | |
| Dim ow As OutputWindow = DTE.Windows.Item(Constants.vsWindowKindOutput).Object | |
| Dim owp As OutputWindowPane | |
| Dim exists As Boolean | |
| Dim i As Integer | |
| Dim sArray() As String | |
| Dim dict As New System.Collections.Generic.Dictionary(Of String, String)() |
This file contains hidden or 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 language="C#" debug="true" hostspecific="true" #> | |
| <#@ output extension=".d.ts" #> | |
| <#@ assembly name="System.Core" #> | |
| <#@ assembly name="Microsoft.VisualStudio.Shell.Interop.8.0" #> | |
| <#@ assembly name="EnvDTE" #> | |
| <#@ assembly name="EnvDTE80" #> | |
| <#@ import namespace="System.Collections.Generic" #> | |
| <#@ import namespace="System.Linq" #> | |
| <#@ import namespace="System.Text" #> | |
| <#@ import namespace="EnvDTE" #> |
This file contains hidden or 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 result = GetStatusMessage(40); | |
| } | |
| struct Pair<T, V> | |
| { | |
| public T Key; | |
| public V Value; | |
| } |
This file contains hidden or 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
| // To use, just do something like : | |
| // ViewBag.Stats = GetClicks(context); | |
| private static List<Stats> GetClicks(AppContext context) | |
| { | |
| var result = new List<Stats>(); | |
| results.Add(GetStats(context, Period.Week)) | |
| results.Add(GetStats(context, Period.Month)) | |
| results.Add(GetStats(context, Period.Today)) |
This file contains hidden or 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== |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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' |
OlderNewer