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
using System; | |
using System.Collections.Generic; | |
using System.DirectoryServices.AccountManagement; | |
using System.Linq; | |
using System.Security.Claims; | |
using System.Threading.Tasks; | |
using Thinktecture.IdentityServer.Core; | |
using Thinktecture.IdentityServer.Core.Models; | |
using Thinktecture.IdentityServer.Core.Services; |
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
<!DOCTYPE html> | |
<html ng-app="app"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" /> | |
<title ng-bind="title"></title> | |
<base href="/"> | |
<style> |
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
declare @TableName sysname = 'DBTableName' | |
declare @result varchar(max) = 'public class ' + @TableName + ' | |
{' | |
select @result = @result | |
+ CASE WHEN ColumnDesc IS NOT NULL THEN ' | |
/// <summary> | |
/// ' + ColumnDesc + ' | |
/// </summary>' ELSE '' END | |
+ ' | |
public ' + ColumnType + ' ' + ColumnName + ' { 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
$CurrentValue = [Environment]::GetEnvironmentVariable("PSModulePath", "Machine") | |
[Environment]::SetEnvironmentVariable("PSModulePath", $CurrentValue + ";E:\Powershell", "Machine") |
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
public static class EnumerableExtensions | |
{ | |
public static IEnumerable<TSource> Distinct<TSource>(this IEnumerable<TSource> enumerable, Func<TSource, TSource, bool> comparer) | |
{ | |
return enumerable.Distinct(new LambdaComparer<TSource>(comparer)); | |
} | |
public static IEnumerable<TSource> Except<TSource>(this IEnumerable<TSource> first, IEnumerable<TSource> second, Func<TSource, TSource, bool> comparer) | |
{ | |
return first.Except(second, new LambdaComparer<TSource>(comparer)); |
NewerOlder