Skip to content

Instantly share code, notes, and snippets.

@miensol
miensol / Gruntfile.js
Created July 1, 2013 19:08
Grunt watching less and coffee Compiles individual files
var path = require('path');
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
coffee: {
all: {
files: [{
@miensol
miensol / Observable
Last active December 16, 2015 13:08
Javascript Observable
var Observable = function(){
var that = this,
listeners = {},
callHandler = function(args){
this.handler.apply(this.scope, args);
},
on = function(eventName, handlerFun, scope){
var listenerList = [], handlerObj;
if(!eventName){
throw "cannot call 'on' with empty eventName";
@miensol
miensol / RazorHtmlFormatter.cs
Created February 27, 2012 19:18
Razor MediaTypeFormatter
using System;
using System.Collections.Concurrent;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http.Formatting;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using RazorEngine;