Skip to content

Instantly share code, notes, and snippets.

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;
@icambridge
icambridge / template.txt
Last active February 27, 2017 20:35
Code Review Template
### SOLID
[ ] Single Responsiblity Principle
[ ] Open/Closed Principle
[ ] Liskov's object replacement Principle
[ ] Interface Segegration Principle
[ ] Dependency Inversion Principle
### Bugs

Schokolade Schlammkuchen mit Erdnussbutter.

Zutaten

Schicht 2X

  • 100g Zartbitter Schokolade
  • 110g Weizenmehl 405
  • 30g Kakao
  • 200g Butter
Scenario:
Given I have made a pick up order
When I post a review
Then it should work
vagrant@php7dev:/vagrant$ php benchmark.php
time: 1.4532651901245
memory usage: 6291456
JMS - PHP 7
---
vagrant@php7dev:/vagrant$ nano benchmark.php
vagrant@php7dev:/vagrant$ php benchmark.php
time: 0.29000401496887
memory usage: 4194304
RAW - PHP 7
Icambridge\Entity\User:
id: encoder.super_duper_silly
<?php
define('WPSQT_VERSION', '1.2.1');
$oldVersion = get_option('wpsqt_version');
update_option('wpsqt_version',WPSQT_VERSION);
// Simple way of checking if an it's an update or not.
if ( !empty($oldVersion) && (version_compare($oldVersion, WPSQT_VERSION) < 0) ){
// Do upgrade stuff.
}