Skip to content

Instantly share code, notes, and snippets.

View tugberkugurlu's full-sized avatar
💥 shakalaka

Tugberk Ugurlu tugberkugurlu

💥 shakalaka
View GitHub Profile
tugberkugurlu /
Created October 2, 2015 12:13 — forked from soheilhy/
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for,, and on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

"dependencies": {
"Microsoft.Composition": "1.0.30" -- Is this nuget dependencies for all frameworks? (yes)
"frameworks": {
"dnx451": {
"dependencies": { -- Is this nuget just for dnx451? (yes)
"frameworkAssemblies": {
"System.Globalization": "", --This is GAC for dnx451? (yes)
configuration MongoDB {
param (
[string[]]$ComputerName = $env:ComputerName
node $ComputerName {
File SetupFolder {
Type = 'Directory'
DestinationPath = "C:\setup"
Ensure = 'Present'
public class Configuration(IAppBuilder app)
// TaskCompletionSource
app.Map("/streaming-api1", map =>
// Streaming API using SignalR
var connectionContext = GlobalHost.ConnectionManager.GetConnectionContext<RawConnection>();
map.Run(async context =>
internal sealed class Configuration : DbMigrationsConfiguration<SpatialDemo.Models.SpatialDemoContext>
public Configuration()
AutomaticMigrationsEnabled = true;
protected override void Seed(SpatialDemo.Models.SpatialDemoContext context)
context.Locations.AddOrUpdate((x) => x.Name,
Set-ExecutionPolicy RemoteSigned
$mongoDbPath = "C:\MongoDB"
$mongoDbConfigPath = "$mongoDbPath\mongod.cfg"
$url = ""
$zipFile = "$mongoDbPath\"
$unzippedFolderContent ="$mongoDbPath\mongodb-win32-x86_64-2008plus-2.2.3"
if ((Test-Path -path $mongoDbPath) -eq $True)
<add key="aspnet:UseHostHeaderForRequestUrl" value="true"/>
using Newtonsoft.Json;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
using System.Dynamic;
using System.Linq;
using System.Linq.Expressions;
using System.Net;
public void Should_be_able_to_consume()
var autoResetEvent = new AutoResetEvent(false);
using (var channel = connection.OpenChannel())
var settings = new ConsumerSettings(queue)
using System;
using System.Collections.Concurrent;
using System.Threading;
using System.Threading.Tasks;
using System.Threading.Tasks.Dataflow;
namespace TDFDemo
class Program