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
# XXX many of the addBoths should be changed to involve error handling | |
""" | |
longrunning | |
This is an example of how one can develop a system using twisted.web | |
that can process long running results but still provide a short | |
request-response cycle. | |
This implements the following pattern: | |
1) request received by twisted application |
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
(gdb) set verbose | |
(gdb) b main | |
Breakpoint 1 at 0x100000e70 | |
(gdb) r foo.rs --out-dir ./bar/baz | |
Starting program: /Users/chris/Code/rust/x86_64-apple-darwin/stage1/bin/rustc foo.rs --out-dir ./bar/baz | |
warning: platform-specific solib_create_inferior_hook did not load initial shared libraries. | |
# this is on os x |
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
# you should put all of the tests to be run for each of the | |
# files as they are being built | |
CC=rustc | |
BUILDDIR=~/Code/matasano/rust/build | |
DOCDIR=~/Code/matasano/rust/docs | |
CCFLAGS=--out-dir $(BUILDDIR) | |
DC=rustdoc --output $(DOCDIR) | |
all: score single_cipher decrypt_single fixed_xor encode64 |
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
[('Date', ['Sat, 30 Nov 2013 03:01:37 GMT']), | |
('Last-Modified', ['Sat, 30 Nov 2013 03:01:37 GMT']), | |
('Accept-Ranges', ['bytes']), | |
('Content-Type', ['text/plain']), | |
('Server', ['TwistedWeb/13.1.0'])] |
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
.directive('sides', function () { | |
return { | |
// this seems to solve the problem - don't use link, use a built in controller. | |
controller: function ($scope) {//, elem, attrs) { | |
$scope.sides = [ | |
{ Name: 'Buy', Id: 1 }, | |
{ Name: 'Sell', Id: -1 } | |
]; | |
$scope.side = $scope.sides[0]; | |
}, |
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
.directive('sides', function() { | |
// not working | |
return { | |
scope: { | |
sides: [ | |
{ Name: 'Buy', Id: 1 }, | |
{ Name: 'Sell', Id: -1 } | |
] | |
}, | |
restrict: 'A', |
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 app = angular.module('App', ['restangular']); | |
app.config(function (RestangularProvider) { | |
RestangularProvider.setBaseUrl('/api'); | |
RestangularProvider.setDefaultHeaders({ | |
"headers": { "common": { "Accept": "application/json" } } | |
}); | |
}); | |
// service that fetches all of the static information that will be needed |
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
angular.module('App', ['restangular']) | |
.config(function(RestangularProvider) { | |
RestangularProvider.setBaseUrl('/api'); | |
RestangularProvider.setDefaultHeaders({ | |
"headers": { "common": { "Accept": "application/json" } } | |
}); | |
}) | |
.service('StaticsService', ['$scope', 'Restangular', | |
function($scope, Restangular) { | |
$scope.commodities = Restangular.all('commodities').getList(); |
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
{ | |
"checks": { | |
"ping_check": { | |
"handlers": ["default"], | |
"command": "/etc/sensu/plugins/check-http.rb -p http://www.rmienergy.com", | |
"interval": 5, | |
"standalone": 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
using Nancy; | |
using Nancy.Testing; | |
using Xunit; | |
using df_nancy.Modules.api; | |
namespace df_tests.ApiTests | |
{ | |
public class PositionApiTests | |
{ | |
[Fact] |