I’ve written a lot of code over the years. Some of it is good.
Here are my GitHub details:
Here are more details on the significant stuff.
This is the library I have the most work into. Denina is a scripting engine meant to be embedded into a CMS. It’s gotten some usage in the Episerver community, and more in the Umbraco community.
- Embedding an RSS Feed with Episerver Denina Block. A two-minute video that shows the general idea.
- Wiki Documentation. There are about 12,000 words of doc out here.
- Editorial Scripting in CMS. The 2015 blog post that lead to Denina’s creation.
- The Promise and Peril of Editorial Scripting. A 45-minute conference talk at Umbraco’s event in 2019. It demonstrates the amazing Umbraco integration (written by someone else).
This is a library to make working with static HTML easier in Episerver. It provides three things:
- A block type to embed HTML
- A media type to extract fragments of markup from uploaded HTML files
- A media type to combine all the resources needed for a fully self-contained client app into a single deploy-able “app file” that editors can simply drag onto the page (here’s a video of this)
For each method, a framework is provided to bootstrap all associated resources (JS and CSS; on-site or remote) and inject them into the page. For options #2 and #3 above, front-end developers could work on code locally, then simply drag it into an Episerver site and let editors easily inject all the necessary resources into a page.
The result is, hopefully, a toolkit to make front-end developers very happy when working with Episerver, and something that provides the ability to blur the line between managed content and static HTML in a responsible, manageable, repeatable way.
When working with URL redirection, I got interested in the concept of URL equality. How do you determine if two URLs are equal?
The real “value” of a URL is the resource it responds with. And two URLs can respond with the same resource while differing in:
- Querystring parameters (both number and order)
- Presence or absence of slashes
- and more…
This library will normalize a URL in several configurable ways, allowing you to compare them to test for equality, or store them in a more standard form.
Poor Man’s Code Editor
This is an example of using a
textarea element that:
- Sort of styles it like a code editor
- Catches tabs and converts them to four (4) spaces
- Duplicates leading spaces from the last line
- Auto-expands to input
It’s not sophisticated, but it’s completely self-contained. If you need a code-ish editor in a place where you can’t or don’t want to pull in anything more complicated, it’s handy.
This is a C# class that will retrieve a bunch of records from Airtable and convert them to POCOs. It reflects the class definition and applies Airtable data based on designated attributes. It has an event model that allows you to modify the data prior to object population, and respond to conversion failures.
While designed for Airtable, it’s a handy reference for a lot of problems you’d find when auto-populating any data in C#. There are a lot of patterns in here that are applicable to anything (swap Airtable out for any other data resource…)
I sent this to Airtable, and they tweeted it from their account at one point. I use it on this site, to retrieve data for The Interesting List.
This was an afternoon project that I did for a challenge and had mixed results with. It’s a C# implementation of Emmet, the HTML code expansion tool that’s built into some code editors.
I wanted something that would run inside the context of C#. The README shows what I implemented.
I put 3-4 hours into this, but it might be handy for some applications. I think I did this for some Denina implementation. I keep meaning to come back to it.
(Contentful) Webhook Server
This is a web application that serves as the target for incoming webhooks and allows you to map them to C# code.
I put “Contentful” as a parenthetical here because, while this was written specifically for Contentful, it could pretty easily be re-used for something else. Even if you don’t use Contentful, the basic theory and logical flow are universal-ish.
Contentful Reverse Lookup UI
This is a UI extension for Contentful that showed all the objects that are linked to the current object.
If you’re looking at Object X, and you have a reference field to Object Y, you can clearly see Object Y in the UI. However, if you’re looking at Object Y, you had no way to know it was linked from Object X (the link was unidirectional, in terms of UI).
This extension shows a little sidebar widget that does a reverse lookup for all of the objects (like Object X) that link to the object you are presently looking at. It provides links to those objects.
(Note: this is quite old. I don’t know if the Contentful UI extension API has changed. I’m told it still worked as of 2018.)
I was heavily involved in the Wyam project for a time (now called Statiq, I believe). I wrote several modules for it:
- ReadApplicationInput: Reads data piped in from the command line
- Objects: Creates documents from any C# object
- Sql: Creates documents from SQL execution (an extension of Objects, above)
- XML: Creates documents from an XML string (an extension of Objects, above)
- GenerateCloudSearchData: Generates JSON to index with Amazon Cloud Search (note: this is very old and communicates with an external service, so I’d be shocked if it still worked)
- Scriban: A template engine using Scriban (note: this was never published as an official module)
Deane’s SQLite Wrapper
This is not an ORM, because we have Entity Framework for that. This library just lets you do some really easy things with SQLite. I wrote it because I got tired of writing the same code over and over.
This might have been a dumb idea. It’s a handy little wrapper to make working with SQLite easier, but this may already be handled by Dapper (which I love; no idea why I didn’t think of it).