Skip to content

Instantly share code, notes, and snippets.

View obiltschnig's full-sized avatar
👨‍💻
I may be slow to respond.

Günter Obiltschnig obiltschnig

👨‍💻
I may be slow to respond.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am obiltschnig on github.
  • I am obiltschnig (https://keybase.io/obiltschnig) on keybase.
  • I have a public key ASBdqdjouyNkhCEhVUj3587fwAYxRkumrYwzfqhfWQDoDgo

To claim this, I am signing this object:

Individual Contributor License Agreement ("Agreement")

Thank you for your interest in tha macchina.io Open Source Project (the "Project"). In order to clarify the intellectual property license granted with Contributions from any person or entity, Applied Informatics Software Engineering GmbH, the "Project Owner", must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of the Project, its users and the Project Owner; it does not

@obiltschnig
obiltschnig / DocumentDB.cpp
Last active February 13, 2017 19:59
Connecting to an Azure DocumentDB instance with Poco::MongoDB (requires POCO release 1.7.8 or newer)
#include "Poco/MongoDB/Connection.h"
#include "Poco/MongoDB/Database.h"
#include "Poco/Net/SecureStreamSocket.h"
#include "Poco/Net/Context.h"
#include "Poco/Net/PrivateKeyPassphraseHandler.h"
#include "Poco/Net/AcceptCertificateHandler.h"
#include "Poco/Net/SSLManager.h"
#include "Poco/SharedPtr.h"
// ...
#include <Poco/Net/HTTPRequest.h>
#include <Poco/Net/HTTPResponse.h>
#include <Poco/Net/HTTPClientSession.h>
#include <Poco/StreamCopier.h>
#include <Poco/Net/HTTPCredentials.h>
#include <sstream>
#include <iostream>
using namespace Poco::Net;
@obiltschnig
obiltschnig / gist:dc2e90643e6fabe7d938
Created March 13, 2015 05:46
Poco::Net::HTTPRequestHandler subclass for sending file ranges, as needed for HTTP-based streaming.
class MediaRequestHandler: public Poco::Net::HTTPRequestHandler
{
public:
enum
{
BUFFER_SIZE = 8192
};
MediaRequestHandler(const std::string& mediaPath):
_mediaPath(mediaPath)