Skip to content

Instantly share code, notes, and snippets.

Michael Dellanoce mdellanoce

Block or report user

Report or block mdellanoce

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mdellanoce
mdellanoce / app.js
Created Dec 9, 2011
Auto-optimization with Express and RequireJS
View app.js
var express = require('express'),
requirejs = require('requirejs'),
app = module.exports = express.createServer();
app.configure('development', function(){
// Use development version of static files
app.use(express.static(__dirname + '/public'));
});
app.configure('production', function(){
@mdellanoce
mdellanoce / BindXmlAttribute.cs
Created Dec 15, 2011
ASP.NET MVC (Version 1) XML Model Binder
View BindXmlAttribute.cs
public class BindXmlAttribute : CustomModelBinderAttribute
{
public override IModelBinder GetBinder()
{
return new XmlModelBinder();
}
}
@mdellanoce
mdellanoce / AsyncCastleActionInvoker.cs
Created Dec 15, 2011
Async controller action invokers
View AsyncCastleActionInvoker.cs
public class CastleActionInvoker : AsyncControllerActionInvoker
{
//...
}
@mdellanoce
mdellanoce / style1.css
Created Jul 6, 2012
Webkit text-overflow ellipsis
View style1.css
span {
white-space: nowrap;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
@mdellanoce
mdellanoce / Cakefile
Last active Dec 16, 2015
Modular Cakefile
View Cakefile
fs = require('fs')
tasks = fs.readdirSync('tasks')
require('./tasks/' + task.replace(/\.coffee$/, '')) for task in tasks
View jquery.css3caching.js
(function($) {
function parseImagesFromCSS(doc) {
var i, j,
rule,
image,
pattern = /url\((.*)\)/,
properties = ['background-image', '-webkit-border-image'],
images = {};
if (doc.styleSheets) {
You can’t perform that action at this time.