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
print("Hello world!") |
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
using System; | |
using System.Linq; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
var env = "prod master"; // Environment.GetEnvironmentVariable("PACT_TAGS"); | |
var tags = env.Split(' '); | |
var uris = tags.Select(t => $"http://broker-host/pacts/provider/MyProvider/consumer/MyConsumer/{t}"); |
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
param( | |
$buildMetadataFile = "package.json", | |
$workingDir = (Get-Location), | |
$pactsDir = (Join-Path $workingDir "pacts"), | |
$pactBroker = "http://my-pact-broker", | |
$templateUrl = "$pactBroker/pacts/provider/:provider/consumer/:consumer/version/:version", |
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
import React from 'react/addons'; | |
import { connect } from 'react-redux'; | |
import { subscribeToSomethings } from '../actions/somethingsActions'; | |
export default class MySmartComponent extends React.Component { | |
constructor(props, context) { | |
super(props, context); | |
this.state = { | |
somethingsSubscription: null | |
}; |
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
(function(target) { | |
let run = generator => { | |
let sequence; | |
let process = result => { | |
if(result.done) { return; } | |
result.value | |
.then(value => { | |
process(sequence.next(value)); | |
}) |
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
(function(target) { | |
let _health = Symbol(); | |
let _speed = Symbol(); | |
class Monster { | |
constructor(name, health, speed) { | |
this.name = name; | |
this[_health] = health; | |
this[_speed] = speed; | |
} |
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 DropOutStack<T> : LinkedList<T> | |
{ | |
private readonly int _capacity; | |
public DropOutStack(int capacity) | |
{ | |
_capacity = capacity; | |
} | |
public void Push(T item) |