Skip to content

Instantly share code, notes, and snippets.

Iain Cambridge icambridge

Block or report user

Report or block icambridge

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View main.go
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))
View example.yaml
kind: Service
apiVersion: v1
metadata:
labels:
app: repositories-service
name: repositories-service
namespace: talenthunt
spec:
type: NodePort
ports:
View example.feature
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
View gist:7cd4c7e650a0e61335f8774f1cf955d8
<?php
class Transfer
{
public $field;
}
class Sender
{
protected $esp;
@icambridge
icambridge / template.txt
Last active Feb 27, 2017
Code Review Template
View template.txt
### SOLID
[ ] Single Responsiblity Principle
[ ] Open/Closed Principle
[ ] Liskov's object replacement Principle
[ ] Interface Segegration Principle
[ ] Dependency Inversion Principle
### Bugs
View gist:6346e4e8580b7c1cec6159af80849f5b

Schokolade Schlammkuchen mit Erdnussbutter.

Zutaten

Schicht 2X

  • 100g Zartbitter Schokolade
  • 110g Weizenmehl 405
  • 30g Kakao
  • 200g Butter
View feature.feature
Scenario:
Given I have made a pick up order
When I post a review
Then it should work
View gist:7204f478dfcb8c5e4811
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
View five.yml
Icambridge\Entity\User:
id: encoder.super_duper_silly
View gist:944f3f3ce5a65653bec5
<?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.
}
You can’t perform that action at this time.