This post is now on my blog at http://blog.brunomlopes.com/2015/07/should-i-put-projectlockjson-in-source.html
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
public class SomeFixture : IDisposable | |
{ | |
private DockerClient client; | |
public SomeFixture() | |
{ | |
Console.WriteLine("SomeFixture ctor: This should only be run once"); | |
//Using https://github.com/ahmetalpbalkan/Docker.DotNet |
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
public class MyHub : Hub | |
{ | |
public Task SendToQuery(string query, string value) | |
{ | |
// Call the send to everybody that has the specified query string value | |
return Clients.Query(c => c.QueryString[query] == value).send(); | |
} | |
} |
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
public class HawkAuthenticationHandler : AuthenticationHandler<HawkAuthenticationOptions> | |
{ | |
private readonly ILogger logger; | |
public HawkAuthenticationHandler(ILogger logger) | |
{ | |
this.logger = logger; | |
} | |
protected override Task<AuthenticationTicket> AuthenticateCore() |
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
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, |
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
export PS1="\n\w\[\033[m\]\[\e[1;32m\]\$(__git_ps1) \[\033[36m\]\${DOCKER_MACHINE_NAME}\[\e[00m\]\n\[\033[32m\]⋙ \[\e[00m\] " |
Tutum Zero Downtime Re-deploy
I tweeted Tutum last night asking if they're looking at implementing zero downtime re-deploys for a given service. Slightly surprised by their response as it seems like a critical feature if you want to use the service for a production environment.
"not a top priority, but by Spring :)"
As Tutum currently doesn't support graceful termination of containers within a service, I was experiencing a 5-10 second window of 503
errors, so decided to use the following hack (code below) until the feature is officially implemented.
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
package main | |
// build +cgo | |
import ( | |
"fmt" | |
"os" | |
"unsafe" | |
) |
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 MongoDB { | |
param ( | |
[string[]]$ComputerName = $env:ComputerName | |
) | |
node $ComputerName { | |
File SetupFolder { | |
Type = 'Directory' | |
DestinationPath = "C:\setup" | |
Ensure = 'Present' | |
} |
OlderNewer