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 imageserver { | |
class { "users": } | |
class { "bashrc": } | |
class { "packages": } | |
class { "gems": } | |
class { "apache2": } | |
} | |
node "ip-xx-xx-xx-xx.eu-west-1.compute.internal" { | |
class { "imageserver": } |
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
describe( "setFailed()", function() { | |
var imageBox = new ImageBox( widget, boxesList ); | |
var element = new MockElement(); | |
var subject = function() { imageBox.setFailed(); return imageBox; } | |
beforeEach( function() { | |
widget.imageBoxes = [ {}, imageBox, {} ]; | |
imageBox.element = element; | |
spyOn( element, "removeClass" ); |
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
ImageBox.prototype.setFailed = function() { | |
var self = this; | |
this.element.removeClass( "uploading" ); | |
this.element.addClass( "failed" ); | |
this.state = "failed"; | |
this.element.delay( 2000 ).fadeOut( 300, function() { | |
self.element.remove(); | |
self.widget.imageBoxes.splice( self.widget.imageBoxes.indexOf( self ), 1 ); | |
self.widget.populateImageBoxes(); | |
self.widget.setSelectionBox(); |
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
#include "gmock/gmock.h" | |
#include <iostream> | |
#include <string> | |
#include <memory> | |
namespace poc { | |
using namespace std; | |
struct IPoc1 | |
{ |
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
/* Compile with: | |
* $CXX -std=gnu++11 -pthread -Wall -g -D_GLIBCXX_USE_NANOSLEEP -I/usr/local/include queuetest.cpp -o queuetest | |
* | |
* Where $CXX points to a G++ compiler, version 4.7 | |
*/ | |
#include <memory> | |
#include <thread> | |
#include <queue> | |
#include <mutex> |
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
~/src/cppcms-1.0.1/build$ make | |
[ 0%] Building CXX object booster/CMakeFiles/booster.dir/lib/ptime/src/posix_time.cpp.o | |
[ 0%] Building CXX object booster/CMakeFiles/booster.dir/lib/ptime/src/ctime.cpp.o | |
[ 1%] Building CXX object booster/CMakeFiles/booster.dir/lib/regex/src/pcre_regex.cpp.o | |
[ 1%] Building CXX object booster/CMakeFiles/booster.dir/lib/system/src/posix_error.cpp.o | |
[ 1%] Building CXX object booster/CMakeFiles/booster.dir/lib/system/src/windows_error.cpp.o | |
[ 2%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/aio_category.cpp.o | |
[ 2%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/deadline_timer.cpp.o | |
[ 2%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/endpoint.cpp.o | |
[ 3%] Building CXX object booster/CMakeFiles/booster.dir/lib/aio/src/io_service.cpp.o |
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 HealthCheckController < ApplicationController | |
## | |
# GET health-check | |
# | |
def index | |
if Typhoeus::Request.get( "#{ SearchExec.server }/#{ SearchExec.index }/_status" ).success? | |
render( :text => "OK", :status => 200 ) | |
else | |
render( :text => "Fail", :status => 500 ) |
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
A ArgumentError occurred in health_check#index: | |
NULL pointer given | |
/usr/lib/ruby/gems/1.8/gems/typhoeus-0.3.2/lib/typhoeus/easy.rb:371:in `easy_getinfo_string' | |
------------------------------- | |
Request: | |
------------------------------- | |
* URL : http://www.myapp.com/health-check |
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
~/work/cpp/rtga$ rake test FILTER="SingleConnectionOperatorTest.*" | |
g++-mp-4.6 -Wall -g -std=c++0x -c -I./include -I/Users/douglivesey/src/gmock/include -I/Users/douglivesey/src/gmock/gtest/include -o test/test_runner.o test/test_runner.cpp | |
g++-mp-4.6 -Wall -g -std=c++0x -c -I./include -I/Users/douglivesey/src/gmock/include -I/Users/douglivesey/src/gmock/gtest/include -o test/unit/rtga/array_test.o test/unit/rtga/array_test.cpp | |
g++-mp-4.6 -Wall -g -std=c++0x -c -I./include -I/Users/douglivesey/src/gmock/include -I/Users/douglivesey/src/gmock/gtest/include -o test/unit/rtga/connection_net_test.o test/unit/rtga/connection_net_test.cpp | |
g++-mp-4.6 -Wall -g -std=c++0x -c -I./include -I/Users/douglivesey/src/gmock/include -I/Users/douglivesey/src/gmock/gtest/include -o test/unit/rtga/connection_test.o test/unit/rtga/connection_test.cpp | |
g++-mp-4.6 -Wall -g -std=c++0x -c -I./include -I/Users/douglivesey/src/gmock/include -I/Users/douglivesey/src/gmock/gtest/include -o test/unit/rtga/exec_test.o test/unit/rtga/exec_tes |
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
#include "gtest/gtest.h" | |
#include "rtga/operator.h" | |
#include "rtga/rtga.h" | |
#include <vector> | |
#include <memory> | |
using namespace std; | |
using namespace rtga; | |
template <typename T> |