This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
function _whatFont(){function s(){var a=b("<p>").css("font-family","S0m3F0n7"),c=b("<p>").css("font-family","serif"),d=b("<p>").css("font-family","sans-serif"),a=new j(new n(a)),c=new j(new n(c));new j(new n(d));q=a.isEqual(c)?"serif":"sans-serif"}var b,m,p,i,r,f,o,g,j,n,u,v,q,t=[];j=function(a,c,d){d=d||{};this.data=[];j.isSupported&&(this.typeInfo=a,this.text=c||"abcdefghijklmnopqrstuvwxyz",this.canvas_options=b.extend(this.canvas_options,d),this.canvas=b("<canvas>")[0],this.draw())};j.isSupported= | |
!!document.createElement("canvas").getContext;j.prototype={canvas_options:{fillStyle:"rgb(0,0,0)",height:50,size:"40px",textBaseline:"top",width:600},getFontOption:function(){return this.typeInfo.style+" "+this.typeInfo.weight+" "+this.canvas_options.size+" "+this.typeInfo.fonts},draw:function(){var a=this.canvas.getContext("2d");b.each(this.canvas_options,function(c,d){a[c]=d});a.font=this.getFontOption();a.fillText(this.text,0,0);return this.data=a.getImageData(0,0,this.canvas_options.width,this.canvas_options. |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using Serilog.Core; | |
using Serilog.Events; | |
namespace Logging.Enrichers | |
{ | |
public class MethodEnricher : ILogEventEnricher | |
{ |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
public abstract class Entity | |
{ | |
public virtual long Id { get; protected set; } | |
protected virtual object Actual => this; | |
public override bool Equals(object obj) | |
{ | |
var other = obj as Entity; | |
if (other is null) |
Saved from Archive.org, Date: May 14, 2010 Author: Jesse Webb
Our development machines here at Point2 are not standardized; we have a mixture of Windows XP, 7, and Mac OSX/Unix computers. I find myself constantly switching back and forth between command prompt interfaces when pair programming. As a result, I catch myself using “ls” to list a directories contents regardless of what system I am on. I am currently using a Windows XP machine for my developer box and I wanted to setup an alias to the “ls” command to actually perform a “dir”. Here is how I accomplished it…
There is a command available in a Window’s shell that let’s you “alias” command to whatever you please: DOSKey. It allows you to create “macros” to execute one or more other commands with a custom nam
// Modified code from http://dotnetthoughts.net/generate-dynamic-xml-sitemaps-in-aspnet5/ | |
public static class SitemapGenerator | |
{ | |
private static string _sitemapContent = null; | |
public static string Generate(string rootUrl, IUrlHelper urlHelper) | |
{ | |
if (_sitemapContent == null) // I only wanted to generate this once and then stash the result. Caching the action that calls this would probably be better | |
{ | |
string sitemapContent = "<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">"; |
public static class CryptographyExtensions | |
{ | |
/// <summary> | |
/// Calculates the MD5 hash for the given string. | |
/// </summary> | |
/// <returns>A 32 char long MD5 hash.</returns> | |
public static string GetHashMd5(this string input) | |
{ | |
return ComputeHash(input, new MD5CryptoServiceProvider()); | |
} |