title | abstract | keywords | categories | weblogName | postId |
---|---|---|---|---|---|
Using Gists for General Purpose Web Pages with Markdown |
Most of you probably know and use Github Gists for sharing Code snippets. But did you know that Gists also support Markdown? Using Markdown makes it easy to create much richer code shareable code and even allows for an easy way to create self-contained Web content. |
Gist,Markdown,Share,Social Media |
Markdown |
West Wind Web Log |
502103 |
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 part1 = new Uri("C:\\temp\\"); // double encodes when combining parts | |
var part2 = "assets/Image%20File.jpg"; | |
var uri = new Uri(part1, part2); | |
uri.Dump(); | |
uri.ToString().Dump(); // still encoded and shouldn't be |
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
/// <summary> | |
/// Helper function that checks to see if the WebView control is installed | |
/// and if not prompts to install it. | |
/// | |
/// Should be called during app startup to ensure the WebView Runtime is available. | |
/// </summary> | |
/// <param name="showDownloadUi"></param> | |
/// <returns></returns> | |
public static bool IsWebViewVersionInstalledUi(bool showDownloadUi = false) | |
{ |
This file has been truncated, but you can view the full file.
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
Tracing enabled @ Tue Sep 26 20:10:54 2023 GMT | |
--- Invoked dotnet [version: 8.0.0-preview.7.23375.6, commit hash: 65b696cf5e7599ad68107138a1acb643d1cedd9d] main = { | |
C:\Program Files\dotnet\dotnet.exe | |
MarkdownMonster.dll | |
--roll-forward | |
LatestMajor | |
--roll-forward-to-prerelease | |
1 | |
} | |
Reading fx resolver directory=[C:\Program Files\dotnet\host\fxr] |
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 builder = new MarkdownPipelineBuilder() | |
//.UseAdvancedExtensions() | |
.UseMediaLinks() | |
.Build(); | |
var md = """ | |
## Plain Image Link | |
![Image](TheArbiterOfTruth.png) |
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 JObject CreateGistPostJson(GistItem gist) | |
{ | |
dynamic obj = new JObject(); | |
obj.Add("description", new JValue(gist.description)); | |
obj.Add("public", gist.isPublic); | |
obj.Add("files", new JObject()); | |
obj.files.Add(gist.filename, new JObject()); |
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; | |
using System.Diagnostics; | |
using System.Net.Sockets; | |
using System.Net; | |
using System.IO; | |
using System.Threading; | |
namespace Westwind.Http.Server | |
{ |
[TestMethod]
public void LoadHandleBarsTest()
{
var engine = new Engine()
// callback functions
.SetValue("log", new Action<object>(Console.WriteLine))
// set global values
.SetValue("startValue", 10);
For ApplicationInsights in particular the UI is absolutely, horrendously terrible. I'm not a fan of Azure portal in general, but the ApplicationInsights portal in particular has a ton of UI issues that are not just cosmetic but functionally broken.
-
Startup shows a getting started video even on direct links to my query list or a specific query.
-
Can't jump directly to a query - always extra steps.
-
Creation of queries in the UI is confusing as hell
Edit and Save are conflated in meaning. Save creates a new Snippet? WTF? But Ctrl-S saves? WTF?
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 LicensingService.Configuration; | |
using Microsoft.AspNetCore.Authentication.Cookies; | |
using Newtonsoft.Json.Serialization; | |
using Westwind.AspNetCore.LiveReload; | |
using Westwind.Licensing; | |
using Westwind.Utilities.Data; | |
var builder = WebApplication.CreateBuilder(args); | |
var services = builder.Services; | |
var configuration = builder.Configuration; |