Skip to content

Instantly share code, notes, and snippets.

View thecodejunkie's full-sized avatar

Andreas Håkansson thecodejunkie

View GitHub Profile
@thecodejunkie
thecodejunkie / Continuous-CoffeeScript.ps1
Created November 21, 2011 21:39 — forked from GraemeF/Continuous-CoffeeScript.ps1
Continuously watches for .coffee file changes in a folder (and subfolders), and runs the CoffeeScript compiler against them
# watch a file changes in the current directory,
# compile when a .coffee file is changed or renamed
# Wrapped Graeme's version up into a function so it can be installed with install-module
# Also changed so it invoked coffee.exe directly, you need Coffee for Windows in your PATH for it to work
# https://github.com/alisey/CoffeeScript-Compiler-for-Windows
function watch
{
$watcher = New-Object System.IO.FileSystemWatcher
$watcher.Path = get-location
namespace Nancy.Jsonp
{
using System;
using System.IO;
using Nancy.Bootstrapper;
public static class Hooks
{
/// <summary>
/// Enable JSONP support in the application
// -- BEFORE --
Post["/create"] = x =>
{
var be = new BeerEvent()
{
Name = Request.Form.Name,
Location = Request.Form.Location,
EventDate = Request.Form.EventDate
};
namespace NancyConNegDemo
{
using Extensions;
using Models;
using Nancy;
public class ConNegModule : NancyModule
{
public ConNegModule() : base("/conneg")
{
[Fact]
public void Should_be_able_to_impliclity_cast_dynamic_member_to_int()
{
// Given
this.dictionary.foo = 2;
// When
int value = this.GetIntValue(this.dictionary.foo);
// Then