Markdown Front Matter For Metadata
OdeToCode by K. Scott Allen
by
4y ago
Continuing the story of replacing Windows Live Writer with some custom tools... In addition to image uploads and code formatting, I also needed the ability to: Specify the date and time for the post to turn publicly visible (future posting). Save the database-generated ID for a post so the post can be updated in the future. Save the server-generated URL for a post to easily preview the post. All of this metadata was information I wanted to track for each markdown file, but I didn't want to keep the metadata outside of the markdown file in a separate store, because synchronization only adds com ..read more
Visit website
Automatic Image Uploads with Markdig Processing
OdeToCode by K. Scott Allen
by
4y ago
Continuing the story of replacing Windows Live Writer with some custom tools... One of the best features of WLW was the ability to paste an image into a post and have the image magically appear on the server in an expected location. For my new workflow, I needed a second Markdig extension to look for images in a post and automatically upload the images through a WebAPI I built into this blog. The WebAPI returns the URL of the uploaded (or updated) image. This API, by the way, was a simple replacement for the ancient XML RPC API that WLW relied on. The Markdig Document Processed Event For this ..read more
Visit website
A Custom Renderer Extension for Markdig
OdeToCode by K. Scott Allen
by
4y ago
A couple years ago I decided to stop using Windows Live Writer for authoring blog posts and build my own publishing tools using markdown and VSCode. Live Writer was a fantastic tool during its heyday, but some features started to feel cumbersome. Adding code into a blog post, as one example. This blog uses SyntaxHighlighter to render code blocks, which requires HTML in a specific format. With WLW the HTML formatting required a toggle into HTML mode, or using an extension which was no longer supported in the OSS version of WLW. What I really wanted was to author a post in markdown and use simpl ..read more
Visit website
The C# Interactive Window
OdeToCode by K. Scott Allen
by
4y ago
The C# Interactive window in VS is not the best interactive C# experience, LINQPad still has the honor, I believe, but it is a quick and convenient option for trying out a few lines of code ..read more
Visit website
Avoiding the Debugger with Better Logging
OdeToCode by K. Scott Allen
by
4y ago
There's actually two reasons why I tend to avoid using debuggers. The first reason is a genuine belief that debuggers encourage short term thinking and quick fixes in software. The second reason is the terrible sights and sounds I witness when I launch a debugger like the VS debugger. It is the noise of combustion and heavy gears engaging. My window arrangement shatters and the work space transforms into a day-trading app with real time graphs and event tickers. A modal dialog pops up and tells me a thread was caught inside the reverse flux capacitor and allowed to execute freely with side-eff ..read more
Visit website
Moving Complexity
OdeToCode by K. Scott Allen
by
4y ago
I always feel a sense of satisfaction when I move a piece of complexity from outside an object to inside an object. It doesn't need to be a large amount of code, I've learned. Every little step helps in the long run. If I could go back 20 years and give myself some programming tips, one of those tips would certainly be this: You don't move code into an abstraction to reuse the code, you move code into an abstraction to use the code ..read more
Visit website
Nine Performance Tips for Azure App Services
OdeToCode by K. Scott Allen
by
4y ago
This post originally appeared on the Progress Telerik blog. Introduction We always want the best performance from the software we deploy to Azure App Services. Not only does better performance make our customers happy, but better performance can also save us money if we "do more with less" in Azure. In this article we'll look at settings and strategies for improving the performance of web applications and web APIs running in an Azure App Service. We'll start with some easy configuration changes you can make for an instant improvement. Enable HTTP/2 Microsoft announced support for HTTP/2 in App ..read more
Visit website
Solving Access Denied in Crypto Machine Keys
OdeToCode by K. Scott Allen
by
4y ago
Previously on OdeToCode I posted about tracking down an AspNetCore build error. Once I realized the access denied message came from the ProgramData\Microsoft\Crypto\RSA\MachineKeys folder, I went searching for reasons why this might happen, and to find possible solutions. Here are some observations based on my research. For Many Developers, Security Only Gets In The Way During my NodeJS days I developed a strange vocalization tic. The tic manifested itself every time I found an answer on Stack Overflow suggesting sudo as the answer to a security problem. As in, "just use sudo npm install and y ..read more
Visit website
Tracking Down an AspNetCore Build Error
OdeToCode by K. Scott Allen
by
4y ago
Building AspNet Core from source is straightforward, unless, like me, you run into strange errors. My first build compiled over 600 projects successfully, but ended up failing and showing the following message. Build FAILED. ALINK : error AL1078: Error signing assembly -- Access is denied. [...\LocalizationSample.csproj] ALINK : error AL1078: Error signing assembly -- Access is denied. [...\LocalizationWebsite.csproj] ALINK : error AL1078: Error signing assembly -- Access is denied. [...\RazorPagesWebSite.csproj] ALINK : error AL1078: Error signing assembly -- Access is denied. [...\BasicTest ..read more
Visit website
Beautiful Binary Literals
OdeToCode by K. Scott Allen
by
4y ago
Finally! I've used binary literals in real code. This feature, and the digits separator have been good additions to the C# language. public static byte[] BreakIntoTwos(byte value) { var result = new byte[4]; result[0] = (byte)((value & 0b1100_0000) >> 6); result[1] = (byte)((value & 0b0011_0000) >> 4); result[2] = (byte)((value & 0b0000_1100) >> 2); result[3] = (byte) (value & 0b0000_0011); return result ..read more
Visit website

Follow OdeToCode by K. Scott Allen on FeedSpot

Continue with Google
Continue with Apple
OR