Skip to content

Instantly share code, notes, and snippets.

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
["Subcategory Facet: PriceRange", "Under £5", "Fearful Argonauts", false]
var checked = $self.attr( "checked" ) == "checked";
_gaq.push( [ "_trackEvent",
categoryType + " Facet: " + facetHeading,
facetBucket,
categoryTitle,
,, checked ] );
@biot023
biot023 / compiler errors
Created March 16, 2013 23:37
Concept / copy-constructor issues
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>,
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 )
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 )
#include "gmock/gmock.h"
#include "poc.h"
#include <string>
namespace {
using namespace std;
using poc::Poc;
using ::testing::Test;
using ::testing::Return;
#pragma once
namespace poc {
template <typename T>
struct IPoc
{
virtual ~IPoc() {}
virtual const bool operator() () = 0;
virtual void abstract_method() const = 0;
# 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 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";
}