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 DiscourseSsoController < ApplicationController | |
def login | |
sso = DiscourseUtils::SingleSignOn.parse( request.query_string ) | |
sso.external_id = current_user.id | |
sso.username = current_user.login | |
sso.name = current_user.display_name | |
sso.email = current_user.email | |
redirect_to( sso.to_url ) | |
end | |
end |
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
["Subcategory Facet: PriceRange", "Under £5", "Fearful Argonauts", false] |
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 checked = $self.attr( "checked" ) == "checked"; | |
_gaq.push( [ "_trackEvent", | |
categoryType + " Facet: " + facetHeading, | |
facetBucket, | |
categoryTitle, | |
,, checked ] ); |
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
lib/nnet/include/nnet/wrapped_stack.h:22:17: error: no member named 'size' in 'nnet::WrappedStack<int>' | |
__stack.size(); // TODO -- DELETE THIS LINE, FOR TESTING ONLY. | |
~~~~~~~ ^ | |
lib/nnet/include/nnet/wrapped_stack.h:37:49: note: in instantiation of member function 'nnet::wrapped_stack_t<nnet::WrappedStack<int>, int>::push' requested here | |
WrappedStack( S &stack ) : __stack( new wrapped_stack_t<S, T>( stack ) ) {} | |
^ | |
/opt/local/libexec/llvm-3.2/bin/../lib/c++/v1/memory:1681:31: note: in instantiation of function template specialization 'nnet::WrappedStack<int>::WrappedStack<nnet::WrappedStack<int> >' requested here | |
::new((void*)__p) _Up(_VSTD::forward<_Args>(__args)...); | |
^ | |
/opt/local/libexec/llvm-3.2/bin/../lib/c++/v1/memory:1608:18: note: in instantiation of function template specialization 'std::__1::allocator<nnet::WrappedStack<int> >::construct<nnet::WrappedStack<int>, |
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 Broadcaster < Struct.new( :listeners ) | |
def broadcast( message, *args ) | |
listeners.each { |listener| listener.send( message, *args ) } | |
end | |
end | |
module Services | |
class ItemCreate < Broadcaster | |
def initialize( params, *listeners ) | |
super( listeners ) |
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
namespace persistence { | |
using ::testing::Invoke; | |
template <typename T> | |
struct MockCreator : public Creator<T> | |
{ | |
typedef map<string, Variant> values_map_t; | |
MockCreator( shared_ptr<const T> object, shared_ptr<IConnection> connection ) | |
: Creator<T>( object, connection ) |
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 "poc.h" | |
#include <string> | |
namespace { | |
using namespace std; | |
using poc::Poc; | |
using ::testing::Test; | |
using ::testing::Return; |
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
#pragma once | |
namespace poc { | |
template <typename T> | |
struct IPoc | |
{ | |
virtual ~IPoc() {} | |
virtual const bool operator() () = 0; | |
virtual void abstract_method() const = 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
# Configuration file for varnish | |
# | |
# /etc/init.d/varnish expects the variables $DAEMON_OPTS, $NFILES and $MEMLOCK | |
# to be set from this shell script fragment. | |
# | |
# Should we start varnishd at boot? Set to "no" to disable. | |
START=yes | |
# Maximum number of open files (for ulimit -n) |
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
# This is a basic VCL configuration file for varnish. See the vcl(7) | |
# man page for details on VCL syntax and semantics. | |
# | |
# Default backend definition. Set this to point to your content | |
# server. | |
# | |
backend default { | |
.host = "our-lovely-image-server.com"; | |
.port = "80"; | |
} |