Skip to content

Instantly share code, notes, and snippets.

<?php
class InterviewController {
public function assignInterview($interviewId) {
$interview = $this→interviewManager→getInterview($interviewId);
$this→interviewManager->automaticallyAssignInterview($interview);
return [“status” => “Success”];
}
}
Scenario: Wanted - Knownledge of dependencies dependencies.
Given I depend on "github.com/src-d/go-git" version 4.3
And "github.com/src-d/go-git" version 4.3 depends on "github.com/src-d/go-billy" version 1.0
When I install dependencies
Then I will have "github.com/src-d/go-billy" version 1.0
And I will have "github.com/src-d/go-git" version 4.3
Scenario: Actual - Knownledge of dependencies dependencies.
Given I depend on "github.com/src-d/go-git" version 4.3
And "github.com/src-d/go-git" version 4.3 depends on "github.com/src-d/go-billy" version 1.0
func main() {
conn, err := amqp.DialConfig("XXXX",
amqp.Config{
Heartbeat: time.Second,
Properties: amqp.Table{
"connection.blocked" : false,
},
})
blockings := conn.NotifyBlocked(make(chan amqp.Blocking))
kind: Service
apiVersion: v1
metadata:
labels:
app: repositories-service
name: repositories-service
namespace: talenthunt
spec:
type: NodePort
ports:
Given I have the following products:
| Name | Price | Description |
| X | 12.23 | A bottle of X |
| Y | 12.33 | A bottle of X |
| Z | 12.43 | A bottle of Y |
And I have put 3 items of product "X" in my basket
When I goto my basket
Then I should have 3 items of product "X"
And I should have a basket value of 36.69
<?php
class Transfer
{
public $field;
}
class Sender
{
protected $esp;

Schokolade Schlammkuchen mit Erdnussbutter.

Zutaten

Schicht 2X

  • 100g Zartbitter Schokolade
  • 110g Weizenmehl 405
  • 30g Kakao
  • 200g Butter
@icambridge
icambridge / gist:7071555
Last active December 26, 2015 01:29
A simple break down of for loops

Understanding for loops

the basic syntax of a for loop goes

for ($var = 0; $var < 10; $var++) {
    // do stuff
}
@icambridge
icambridge / gist:4587114
Created January 21, 2013 16:14
Quick gist of adding new nodes to a load balancer.
import org.jclouds.loadbalancer.domain.LoadBalancerMetadata
import org.jclouds.rackspace.cloudloadbalancers.CloudLoadBalancersApi
import org.jclouds.rackspace.cloudloadbalancers.CloudLoadBalancersAsyncApi
import org.jclouds.rackspace.cloudloadbalancers.domain.NodeRequest
import org.jclouds.rest.RestContext
org.jclouds.rackspace.cloudloadbalancers.domain.internal.BaseNode._
val nova = loadBalance.getContext.unwrap.asInstanceOf[RestContext[CloudLoadBalancersApi, CloudLoadBalancersAsyncApi]]
val nodeApi = nova.getApi.getNodeApiForZoneAndLoadBalancer(zone,id.toInt)
@icambridge
icambridge / gist:4454572
Created January 4, 2013 17:56
Shows that the variable created within the scope of the begin end isn't destoryed after the loop.
people = ['one','two','three','four']
counter = 0;
begin
person = people[counter]
puts person
counter = counter + 1
end while not people[counter].nil?