Skip to content

Instantly share code, notes, and snippets.

View mdellanoce's full-sized avatar

Michael Dellanoce mdellanoce

  • Pendo
  • Raleigh, NC
View GitHub Profile
@mdellanoce
mdellanoce / Cakefile
Last active December 16, 2015 10:39
Modular Cakefile
fs = require('fs')
tasks = fs.readdirSync('tasks')
require('./tasks/' + task.replace(/\.coffee$/, '')) for task in tasks
(function($) {
function parseImagesFromCSS(doc) {
var i, j,
rule,
image,
pattern = /url\((.*)\)/,
properties = ['background-image', '-webkit-border-image'],
images = {};
if (doc.styleSheets) {
@mdellanoce
mdellanoce / style1.css
Created July 6, 2012 18:18
Webkit text-overflow ellipsis
span {
white-space: nowrap;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
@mdellanoce
mdellanoce / AsyncCastleActionInvoker.cs
Created December 15, 2011 15:33
Async controller action invokers
public class CastleActionInvoker : AsyncControllerActionInvoker
{
//...
}
@mdellanoce
mdellanoce / BindXmlAttribute.cs
Created December 15, 2011 00:57
ASP.NET MVC (Version 1) XML Model Binder
public class BindXmlAttribute : CustomModelBinderAttribute
{
public override IModelBinder GetBinder()
{
return new XmlModelBinder();
}
}
@mdellanoce
mdellanoce / app.js
Created December 9, 2011 22:21
Auto-optimization with Express and RequireJS
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(){