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
export PS1="\n\w\[\033[m\]\[\e[1;32m\]\$(__git_ps1) \[\033[36m\]\${DOCKER_MACHINE_NAME}\[\e[00m\]\n\[\033[32m\]⋙ \[\e[00m\] " |
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 |
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.
$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
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
# curl -Lk https://gist.githubusercontent.com/prabirshrestha/279d8b179d9353fe8694/raw/.bash_profile -o ~/.bash_profile | |
[[ -s ~/.nvm/nvm.sh ]] && . ~/.nvm/nvm.sh # This loads NVM | |
export PATH="$HOME/.cargo/bin:$HOME/go/bin:$HOME/Library/Python/3.7/bin:$PATH" | |
export PATH="$HOME/.config/nvim/plugins/vim-themis/bin:$PATH" | |
stty -ixon | |
alias pbcopy='xsel --clipboard --input' | |
alias pbpaste='xsel --clipboard --output' |
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 enum Cacheability | |
{ | |
NoCache, | |
Private, | |
Public, | |
} |
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' | |
} |
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 Configuration(IAppBuilder app) | |
{ | |
// TaskCompletionSource | |
app.Map("/streaming-api1", map => | |
{ | |
// Streaming API using SignalR | |
var connectionContext = GlobalHost.ConnectionManager.GetConnectionContext<RawConnection>(); | |
map.Run(async context => | |
{ |
NewerOlder