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
using System; | |
using System.Security.Cryptography; | |
using System.Text; | |
using Microsoft.AspNet.Identity; | |
namespace Project | |
{ | |
public class CustomPasswordHasher<TUser> : ICustomPasswordHasher<TUser> where TUser : class , IUser<string> | |
{ |
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
namespace Project { | |
public static class Utilities { | |
public static string[] ByteUnits = {"kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"}; | |
public static string GetPrettyFileSize(int fileSize) { | |
return GetPrettyFileSize((double)fileSize); | |
} | |
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
using System; | |
using System.Collections.Generic; | |
namespace Gists | |
{ | |
public static class ListExtensions | |
{ | |
public static T GetRandom<T>(this List<T> list, Random random = null) | |
{ | |
random = random ?? new Random(); |
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
using System; | |
using System.ComponentModel.DataAnnotations; | |
using Microsoft.AspNet.Identity.EntityFramework; | |
using Newtonsoft.Json; | |
namespace Project.Models | |
{ | |
[MetadataType(typeof (ApplicationUserMetaData))] | |
public class ApplicationUser : IdentityUser | |
{ |
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
module Dev.Controllers { | |
export class DemoController { | |
static $inject: string[] = ["$scope"]; | |
constructor($scope: any) { | |
// ... | |
} |
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
SELECT | |
t.NAME AS TableName, | |
s.Name AS SchemaName, | |
p.rows AS RowCounts, | |
SUM(a.total_pages) * 8 AS TotalSpaceKB, | |
SUM(a.used_pages) * 8 AS UsedSpaceKB, | |
(SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB | |
FROM | |
sys.tables t | |
INNER JOIN |
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
modelBuilder.Entity<ApplicationUser>().ToTable("Users"); | |
modelBuilder.Entity<IdentityUserRole>().ToTable("UserRoles"); | |
modelBuilder.Entity<IdentityUserLogin>().ToTable("UserLogins"); | |
modelBuilder.Entity<IdentityUserClaim>().ToTable("UserClaims"); | |
modelBuilder.Entity<IdentityRole>().ToTable("Roles"); |
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
using System.Runtime.InteropServices; | |
using System.Windows.Forms; | |
namespace MediaHotkeys | |
{ | |
internal class Program | |
{ | |
[DllImport("user32.dll", SetLastError = true)] | |
private static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo); |
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
using System.Collections.Generic; | |
using Newtonsoft.Json; | |
using System.Linq; | |
using System.Web.Http; | |
using System.Web.Http.Description; | |
namespace Projektname.BootgridStuff { | |
/// <summary> | |
/// Represents a xhr request from a bootgrid component |
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
<p>Text that does not need to be themed</p> |