Skip to content

Instantly share code, notes, and snippets.

View trdunsworth's full-sized avatar

Tony Dunsworth trdunsworth

View GitHub Profile
@richlander
richlander / modernizing-csharp9.md
Last active April 26, 2024 17:14
Modernizing a codebase for C# 9

Modernizing a codebase for C# 9

There are lots of cases that you can improve. The examples use nullable reference types, but only the WhenNotNull example requires it.

Use the property pattern to replace IsNullorEmpty

Consider adopting the new property pattern, wherever you use IsNullOrEmpty.

string? hello = "hello world";
@ericelliott
ericelliott / essential-javascript-links.md
Last active May 17, 2024 03:38
Essential JavaScript Links
@addyosmani
addyosmani / README.md
Last active April 2, 2024 20:18 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

@Satal
Satal / Usage.cs
Last active March 6, 2017 15:23
XsdValidator
public void MultipleSchemas()
{
var validator = new XsdValidator();
validator.AddSchema(@"SchemaDoc1.xsd");
validator.AddSchema(@"SchemaDoc2.xsd");
var isValid = validator.IsValid(@"ValidXmlDoc1.xml");
}
@lynxerzhang
lynxerzhang / notepad's theme
Created August 28, 2012 02:36
notepad++'s theme collection
(some notepad++'s theme)
http://wiki.macromates.com/Themes/UserSubmittedThemes
(Textmate theme to Notepad++ (.tmTheme converted to .xml, go to [users]/AppData/Roaming/Notepad++, replace the stylers.xml with the xml file))
http://framework.lojcomm.com.br/tmTheme2nppStyler/
@kevinpang
kevinpang / gist:1917941
Created February 26, 2012 17:50
StructureMapControllerFactory
public class StructureMapControllerFactory : DefaultControllerFactory
{
public override IController CreateController(RequestContext requestContext, string controllerName)
{
try
{
var controllerType = base.GetControllerType(requestContext, controllerName);
return ObjectFactory.GetInstance(controllerType) as IController;
}
catch (Exception)
@paulirish
paulirish / data-markdown.user.js
Last active February 6, 2024 10:41
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.