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
{ | |
"class": ["project", "list"], | |
"entities": [ | |
{ | |
"class": ["member", "project"], | |
"rel": ["http://darcinc.net/api/v1/project"] | |
"properties": { | |
"name": "Project name", | |
"description": "A handy description.", | |
"scheduledCost": 1000000, |
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
[ | |
{ | |
"_id": "abcdef12345", | |
"name": "New Project", | |
"description": "Project description.", | |
"scheduledCost": 1000, | |
"scheduledDuration": 10, | |
"owner": "abcdef1345", | |
"urls": [ | |
{ "url": "/projects/2345", "rel": "show", "method": "get" } |
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
{ | |
"class": ["authorization"], | |
"properties": { | |
"token": "abcdef12345", | |
"expiration": "2014-03-25T15:00:05" | |
}, | |
"actions": [ | |
{ | |
"name": "projects", | |
"title": "List user projects", |
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
{ | |
"authorization": { | |
"token": "abcdefg12345", | |
"expires": "2014-03-27T15:00:05" | |
}, | |
"urls": { | |
"projects": { | |
"url": "/api/v1/projects", | |
"rel": "projects", | |
"method": "get" |
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
<script type="text/ng-template" id="some-modal-dialog.html"> | |
<div class="modal-header"> | |
<h3>My Modal Title</h3> | |
</div> | |
<div class="modal-body"> | |
<div> | |
<button class='btn btn-default' id="add-risk-button" ng-click="clickedOkay()"> | |
Add Project | |
</button> | |
</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
myApp.controller("RegularController", ["$scope", "$modal", function($scope, $modal) { | |
$scope.open = function() { | |
var modalInstance = $modal.open({ | |
templateUrl: "some-modal-dialog.html", | |
controller: MyModalInstanceController, | |
scope: $scope | |
}); | |
modalInstance.result.then( |
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
var queueName = 'tasks'; | |
var amq = require('amq'); | |
var connection = amq.createConnection( | |
{ host: 'localhost', debug: true }, | |
{ reconnect: { strategy: 'constant', initial: 1000 } } | |
); | |
var queue = connection.queue(queueName, { durable: true }); |
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
var queueName = 'tasks'; | |
var exchangeName = 'taskExchange'; | |
var key = 'all'; | |
var amq = require('amq'); | |
var readline = require('readline'); | |
var connection = amq.createConnection( | |
{ host: 'localhost', debug: true }, | |
{ reconnect: { strategy: 'constant', initial: 1000 } } |