Skip to content

Instantly share code, notes, and snippets.

View glcheetham's full-sized avatar

Gary Lewis Cheetham glcheetham

View GitHub Profile
@glcheetham
glcheetham / Example.cs
Created January 29, 2017 11:39
Example instantiation of loosely-coupled class which depends on UmbracoHelper
var umbracoHelper = new Umbraco.Web.UmbracoHelper(Umbraco.Web.UmbracoContext.Current);
// Or from any other environment that comes with UmbracoHelper already available https://our.umbraco.org/documentation/reference/querying/umbracohelper/
// UmbracoHelper.ContentQuery implements the ITypedContentQuery interface
var resourceService = new ResourceService(umbracoHelper.ContentQuery);
@glcheetham
glcheetham / App.jsx
Created October 7, 2017 11:51
JSX Bootstrap 3 Kitchen Sink
const KitchenSink = () => (<div classNameName="App">
<div className="navbar navbar-default navbar-static-top">
<div className="container">
<div className="navbar-header">
<button type="button" className="navbar-toggle" data-toggle="collapse" data-target=".header-collapse">
<span className="sr-only">Toggle navigation</span> <span className="icon-bar"></span> <span className="icon-bar"></span> <span className="icon-bar"></span>
</button>
<a className="navbar-brand" href="#">Kitchen Sink</a>
</div>
@glcheetham
glcheetham / javascript-uk-number-plate-validation.md
Last active March 6, 2024 12:59 — forked from danielrbradley/uk-number-plate-validation.md
Javascript Regular Expression to Validate UK Number Plates

Javascript Regular Expression to Validate UK Number Plates

Regular Expression

Works in jQuery, React, Angular, Javascript es6 and es5

(^[A-Z]{2}[0-9]{2}\s?[A-Z]{3}$)|(^[A-Z][0-9]{1,3}[A-Z]{3}$)|(^[A-Z]{3}[0-9]{1,3}[A-Z]$)|(^[0-9]{1,4}[A-Z]{1,2}$)|(^[0-9]{1,3}[A-Z]{1,3}$)|(^[A-Z]{1,2}[0-9]{1,4}$)|(^[A-Z]{1,3}[0-9]{1,3}$)

Source information

Forked from here but updated to work in JavaScript, and added an optional space