This file contains hidden or 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
class Player | |
play: (song) -> | |
@currentlyPlayingSong = song | |
@isPlaying = true | |
pause: -> | |
@isPlaying = false | |
resume: -> | |
throw new Error "song is already playing" if this.isPlaying |
This file contains hidden or 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
# watch a file changes in the current directory, | |
# compile when a .coffee file is changed or renamed | |
$watcher = New-Object System.IO.FileSystemWatcher | |
$watcher.Path = get-location | |
$watcher.IncludeSubdirectories = $true | |
$watcher.EnableRaisingEvents = $false | |
$watcher.NotifyFilter = [System.IO.NotifyFilters]::LastWrite -bor [System.IO.NotifyFilters]::FileName | |
while($TRUE){ |
This file contains hidden or 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
namespace TypedFactoryTests | |
{ | |
#region Using Directives | |
using Castle.Facilities.TypedFactory; | |
using Castle.MicroKernel.Registration; | |
using Castle.Windsor; | |
using Should.Fluent; |
This file contains hidden or 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
Import-Module pswatch | |
Function Rebuild($message) | |
{ | |
cls | |
Write-Host $message | |
Invoke-psake .\build.ps1 | |
} | |
Rebuild "Starting up." |
This file contains hidden or 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
{Feature} = require "vows-bdd" | |
vows = require 'vows' | |
assert = require 'assert' | |
Feature("Share stuff between steps", module) | |
.scenario("Set properties on given and when") | |
.given "A is set", -> | |
@A = "A" | |
@callback() |
This file contains hidden or 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
Feature("Character management", module) | |
.scenario("Create a new character") | |
.given(Events.Named_AreSubscribedTo "characterCreated") | |
.when(Character._IsCreatedWithName_ 1, 'bob') | |
.then(Events.ShouldDescribeTheCreationOfCharacter_Named_ 1, 'bob') | |
.complete() |
This file contains hidden or 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> | |
<body> | |
<form data-bind="submit: onSubmit"> | |
<button type="submit">Submit</button> | |
</form> | |
<script type="text/javascript" src="knockout-2.0.0.js"></script> | |
<script type="text/javascript"> | |
window.onload = function () { |
This file contains hidden or 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
<p>Name: <input data-bind="value: name"/></p> | |
<h2>Hello, <span data-bind="text: name"> </span>!</h2> |
This file contains hidden or 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
var requireWithDeps = require('./requireWithDeps'); | |
var sinon = require('sinon'); | |
var fakejQuery = { | |
doSomething: sinon.stub() | |
}; | |
var Foo = requireWithDeps('./Foo.js', {'jquery': fakejQuery}); | |
var fooToTest = new Foo(); |
This file contains hidden or 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
[default] Mounting shared folders... | |
[default] -- v-root: /vagrant | |
[default] -- v-csc-1: /tmp/vagrant-chef-1/chef-solo-1/cookbooks | |
[default] Running provisioner: Vagrant::Provisioners::ChefSolo... | |
[default] Generating chef JSON and uploading... | |
[default] Running chef-solo... | |
stdin: is not a tty | |
[Mon, 26 Mar 2012 11:15:51 -0700] INFO: *** Chef 0.10.2 *** | |
[Mon, 26 Mar 2012 11:15:52 -0700] INFO: Setting the run_list to ["recipe[cassandra::default]"] from JSON | |
[Mon, 26 Mar 2012 11:15:52 -0700] INFO: Run List is [recipe[cassandra::default]] |