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 works with an abstract class:
Base class:
/// <summary>
/// Handles the Administration Form API backend tasks
/// </summary>
[Route("api/LocalizationAdministration")]
[UnhandledApiExceptionFilter]
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
[Registry] | |
; File Association for .md and .markdown | |
Root: HKCR; Subkey: ".md"; ValueData: "{#MyAppName}"; Flags: uninsdeletevalue; ValueType: string; ValueName: "" | |
Root: HKCR; Subkey: ".markdown"; ValueData: "{#MyAppName}"; Flags: uninsdeletevalue; ValueType: string; ValueName: "" | |
Root: HKCR; Subkey: "{#MyAppName}"; ValueData: "Program {#MyAppName}"; Flags: uninsdeletekey; ValueType: string; ValueName: "" | |
Root: HKCR; Subkey: "{#MyAppName}\DefaultIcon"; ValueData: "{app}\{#MyAppExeName},0"; ValueType: string; ValueName: "" | |
Root: HKCR; Subkey: "{#MyAppName}\shell\open\command"; ValueData: """{app}\{#MyAppExeName}"" ""%1"""; ValueType: string; ValueName: "" |
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 class DebounceDispatcher | |
{ | |
private DispatcherTimer timer; | |
public void Debounce(int timeout, Action<object> action, | |
object param = null, | |
DispatcherPriority priority = DispatcherPriority.ApplicationIdle, | |
Dispatcher disp = null) | |
{ | |
if (disp == null) |
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.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Mobi2GoClient.Entities; | |
using Newtonsoft.Json.Linq; | |
using Quobject.EngineIoClientDotNet.Client; | |
using Quobject.SocketIoClientDotNet.Client; | |
using Socket = Quobject.SocketIoClientDotNet.Client.Socket; |
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
[TestMethod] | |
public void BitmapWpfPngSaveTest() | |
{ | |
Assert.IsTrue(System.Windows.Clipboard.ContainsImage(), "No image on clipboard"); | |
string of = "c:\\temp\\test_Bitmap.png"; | |
var bmpSource = System.Windows.Clipboard.GetImage(); | |
using (var fileStream = new FileStream(of, FileMode.Create)) |
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 void ImageSharpClipboardTest() | |
{ | |
string of = "c:\\temp\\test_imagesharp.png"; | |
Assert.IsTrue(Clipboard.ContainsImage(), "No image on clipboard"); | |
var img = Clipboard.GetImage(); | |
ImageConverter converter = new ImageConverter(); | |
byte[] bytes = (byte[])converter.ConvertTo(img, typeof(byte[])); |
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 override void OnExecute(object sender) | |
{ | |
var editor = GetMarkdownEditor(); | |
if (editor == null) | |
return; | |
var gist = new GistItem() | |
{ | |
code = editor.AceEditor.getselection(false), | |
language = "cs" |
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 msg = $".NET Version: {Environment.Version.ToString()}"; | |
msg.Dump(); | |
StringFormat(); | |
BasicInterpolation(); | |
MultiLine(); |