Skip to content

Instantly share code, notes, and snippets.

View drift's full-sized avatar

Justin Moore drift

View GitHub Profile
@Zmaster
Zmaster / autoSizeInput.html
Created October 10, 2013 18:47
This is an AngularJS directive for having an automatically resizing text input that has two way data binding. Most of the credit goes to the plunkers in this questions (http://stackoverflow.com/questions/17410896/angularjs-directive-input-width-resize-by-keyup) for coming up with the starting point for the directive.
<span>
<input type="text" ng-model="value">
<span style="visibility:hidden; position:absolute; left:-1000; top:-1000;">{{value}}</span>
</span>
@warrenbuckley
warrenbuckley / XML-Snippet
Created July 31, 2013 09:15
Trying to create an XML Sitemap in Umbraco 6. Getting the following error: ============================================================ This page contains the following errors: error on line 9 at column 10: Extra content at the end of the document Below is a rendering of the page up to the first error.
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
Layout = null;
Response.ContentType = "text/xml";
}<xml version="1.0" encoding="UTF-8">
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>http://www.example.com/</loc>
<lastmod>2005-01-01</lastmod>
<changefreq>monthly</changefreq>
@leekelleher
leekelleher / MyApplication.cs
Last active December 19, 2015 13:59
Example of Umbraco 6.1's IContentFinder
using Umbraco.Core;
using Umbraco.Core.Services;
using Umbraco.Web.Mvc;
using Umbraco.Web.Routing;
namespace Our.Umbraco
{
public class MyApplication : ApplicationEventHandler
{
protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)