| Models | Examples |
|---|---|
| Display ads | Yahoo! |
| Search ads |
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
| before(function (done) { | |
| /** | |
| * Mocha is extremely zealous about trapping errors, and runs each test | |
| * in a try / catch block. To get the exception to propagate out to the | |
| * domain's uncaughtException handler, we need to put the test in an | |
| * asynchronous context and break out of the mocha jail. | |
| */ | |
| process.nextTick(function () { | |
| // disable mocha's error handler | |
| mochaHandler = process.listeners('uncaughtException').pop(); |
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
| define([ | |
| "underscore", | |
| "backbone", | |
| "marionette", | |
| "vent" | |
| ], | |
| /** | |
| * Creates the primary `Marionette.Application` object that runs the admin framework. Provides a central point | |
| * from which all other sub-applications are started, shown, hidden, and stopped. |
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
| // Marionette.Gauntlet v0.0.0 | |
| // -------------------------- | |
| // | |
| // Build wizard-style workflows with an event-emitting state machine | |
| // Requires Backbone.Picky (http://github.com/derickbailey/backbone.picky) | |
| // | |
| // Copyright (C) 2012 Muted Solutions, LLC. | |
| // Distributed under MIT license | |
| Marionette.Gauntlet = (function(Backbone, Picky, Marionette, $, _){ |
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
| activity = $(document).asEventStream "keyup mousemove" | |
| inactivity = activity.skipDuplicates().map((x)->x.timeStamp).toProperty("") | |
| activity.subscribe(-> $("#test").show()) | |
| inactivity.combine(inactivity.delay(1500), (a, b) -> a is b) | |
| .filter((x)->x).subscribe(-> $("#test").hide()) |
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
| public class GetEventStoreRepository : IRepository | |
| { | |
| private const string EventClrTypeHeader = "EventClrTypeName"; | |
| private const string AggregateClrTypeHeader = "AggregateClrTypeName"; | |
| private const string CommitIdHeader = "CommitId"; | |
| private const int WritePageSize = 500; | |
| private const int ReadPageSize = 500; | |
| private readonly Func<Type, Guid, string> _aggregateIdToStreamName; |
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 Watcher | |
| constructor: (options) -> | |
| @idleTime = options.idleTime or 3500 | |
| @onCallback = options.onCallback or -> | |
| @offCallback = options.offCallback or -> | |
| eventEquals = (a,b) -> | |
| a and b and a.pageX is b.pageX and a.pageY is b.pageY | |
| mousemoves = Bacon.fromEventTarget(body, "mousemove") |
Format: 1A Host: http://blog.acme.com
NOTE: This document is outdated. Refer to the actual API Blueprint examples.
Welcome to the ACME Blog API. This API provides access to the ACME Blog service.
- open UDP port 1194 using EC2 security groups
sudo apt-get install openvpn
sudo openvpn —genkey —secret /etc/openvpn/openvpn-key.txt
sudo modprobe iptable_nat
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
sudo iptables -t nat -A POSTROUTING -s 10.8.0.1/2 -o eth0 -j MASQUERADE