This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'haml' | |
def codify (file_name, caption) | |
source = IO.read "code/#{file_name}.txt" | |
haml_tag :div, :class=>"figure" do | |
haml_tag :span, :class=>"caption" do | |
haml_concat "#{caption} (#{file_name}.cs)" | |
end | |
haml_concat preserve(source) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rule ".txt" => ".cs" do |t| | |
puts "Creating #{t.name} from #{t.source}" | |
sh "uv #{t.source} > #{t.name} -t idle" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web.Routing; | |
namespace MvcHelpers | |
{ | |
public class HttpVerbConstraint : IRouteConstraint | |
{ | |
public const string XHTTPMethodOverride = "X-HTTP-Method-Override"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.ServiceModel; | |
using VideoStore.Domain; | |
using VideoStore.Contracts; | |
using System.ServiceModel.Description; | |
namespace VideoStore.Host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Unlock(bool isDigiLock) | |
{ | |
KeyLock regularLock = new KeyLock(); | |
DigiLock modernLock = new DigiLock(); | |
if(isDigiLock) | |
{ | |
modernLock.Unlock(); | |
} | |
else | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %> | |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title>Index</title> | |
<script src="../../Scripts/jquery-1.4.1.js" type="text/javascript"></script> | |
<script type="text/javascript"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
namespace VideoStore.Domain | |
{ | |
public class MediaLookup | |
{ | |
private IDictionary<int, Media> items = new Dictionary<int, Media> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); | |
routes.MapRoute( | |
"Destroy", | |
"{controller}/{id}", | |
new { action = "Destroy" }, | |
new { id=@"\d+", httpMethod = new RestHttpMethodConstraint("DELETE") } | |
); | |
routes.MapRoute( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body > | |
<div > |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Routing; | |
namespace Monday.Models | |
{ | |
public class HttpVerbConstraint : IRouteConstraint | |
{ |
OlderNewer