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
let payment_id = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | |
let submission_id =xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | |
result = post payment with payment_id | |
if result = 409 | |
log warn payment exists | |
result = post payment_submission with payment_id, submission_id |
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
#!/bin/bash | |
set -ex | |
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ | |
# | |
# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update" | |
current_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
cn=$1 | |
out_dir=$2 | |
key_file=$cn.key.pem |
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
# Do service discovery lookups against the Consul service catalog. | |
namers: | |
- kind: io.l5d.consul | |
includeTag: false | |
useHealthCheck: false | |
routers: | |
- protocol: http | |
label: /http-consul | |
identifier: | |
kind: io.l5d.path |
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
# Do service discovery lookups against the Consul service catalog. | |
namers: | |
- kind: io.l5d.consul | |
includeTag: false | |
useHealthCheck: false | |
- kind: io.l5d.fs | |
rootDir: /opt/linkerd-0.8.6/disco/ | |
routers: |
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
#!/usr/bin/env bash | |
set -e | |
echo "Installing dependencies..." | |
sudo apt-get update -y | |
sudo apt-get install -y unzip | |
echo "Fetching vault..." | |
VAULT=0.6.5 |
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
[Unit] | |
Description=vault server | |
Requires=network-online.target | |
After=network-online.target consul.service | |
[Service] | |
EnvironmentFile=-/etc/default/vault | |
Restart=on-failure | |
ExecStart=/usr/local/bin/vault server $OPTIONS -config=/etc/vault.d/vault.conf | |
ExecStartPost=/bin/bash -c "echo 'Waiting for vault to start' && sleep 5s && for key in $KEYS; do echo unsealing with key $key && /usr/local/bin/vault unseal $key; done" |
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 TaskSchedulerPool | |
{ | |
private readonly List<Lazy<TaskScheduler>> _taskSchedulers; | |
public TaskSchedulerPool(int maxSize) | |
{ | |
_taskSchedulers = Enumerable.Range(1, maxSize) | |
.Select( | |
_ => new Lazy<TaskScheduler>(() => new ConcurrentExclusiveSchedulerPair().ExclusiveScheduler)) | |
.ToList(); |
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
/// <summary> | |
/// The result of a timing operation | |
/// </summary> | |
public interface IOperationResult : IDisposable, ISplitTimer | |
{ | |
/// <summary> | |
/// Gets or sets the elapsed time this operation took to complete. | |
/// </summary> | |
TimeSpan Elapsed { get; set; } |
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 Example | |
{ | |
public IInstanceFactory InstanceFactory { get; set; } | |
public void GetInstanceWithArgument() | |
{ | |
var foo = this.InstanceFactory<Employee, string>("ArgumentValue1") | |
} | |
} |
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 When_calling_foo_service : WithIntegrationSubject<ServiceClientWrapper<IFooService>> | |
{ | |
Establish context = () => With<RunningService>(); | |
Because of = () => FooActionResponse = Subject.Channel.Action(new FooActionRequest()); | |
It should_return_a_response = () => FooActionResponse.ShouldNotBeNull(); | |
static FooActionResponse FooActionResponse; | |
} |
NewerOlder