Skip to content

Instantly share code, notes, and snippets.

View paulgibbs's full-sized avatar

Paul Wong-Gibbs paulgibbs

View GitHub Profile
@paulgibbs
paulgibbs / wut.php
Last active January 8, 2017 11:29
weird php
<?php
$argv = array_slice( $GLOBALS['argv'], 1 );
die(var_dump(array(
$argv,
$argv[$i],
serialize($argv[$i]),
json_encode($argv[$i]),
json_decode(json_encode($argv[$i]))
)));
WHSHASCRIPT="sha1sum" && (type sha1sum >/dev/null 2>&1 || WHSHASCRIPT="shasum")
Feature: Product basket
In order to buy products
As a customer
I need to be able to put interesting products into a basket
Scenario: Buying a single product under £10
Given I am logged in as an admin
When I add the "Sith Lord Lightsaber" to the basket.
Then I should see an error message that says "yolo"
@paulgibbs
paulgibbs / test.php
Last active December 14, 2016 12:48
get_post_galleries bug in WP 4.7 branch and PHP 7.1
<?php
public function test_this_breaks_on_php71() {
$post_id = $this->factory->post->create( array(
'post_content' => 'blah [gallery] blah',
) );
$gallery = get_post_galleries( $post_id, false );
$this->assertSame( array( array( 'src' => array() ) ), $gallery );
}
https://paulgibbs.github.io/usat.html
http://mmajwasabi.lrnc-qa.usatodaysports.com/2014/12/dallas-cowboys-tony-romo-demarco-murray-nine-wins-nfl-playoffs
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
http://www.buddyboss.com/BuddyPress-Wall-Plugin?gclid=CL3thMr2ptACFQEM0wodOwAJPQ
@paulgibbs
paulgibbs / -
Created October 26, 2016 11:04
diff --git a/config.yaml b/config.yaml
index 6c3e0ce..b73558b 100644
--- a/config.yaml
+++ b/config.yaml
@@ -15,7 +15,7 @@
#
# (When overriding, include vagrant.local if you need it)
hosts:
- - vagrant.local
+ - colt.dev
@paulgibbs
paulgibbs / -
Created October 21, 2016 15:24
Index: src/wp-includes/capabilities.php
===================================================================
--- src/wp-includes/capabilities.php (revision 38699)
+++ src/wp-includes/capabilities.php (working copy)
@@ -470,7 +470,7 @@
$current_user = wp_get_current_user();
- if ( empty( $current_user ) ) {
+ if ( ! $current_user->ID ) {
<item>
<title>Digital Transformation</title>
<link>http://www.colt.net/blog/2015/10/01/digital-transformation/</link>
<pubDate>Thu, 01 Oct 2015 22:11:18 +0000</pubDate>
<dc:creator><![CDATA[Colt Technology Services]]></dc:creator>
<guid isPermaLink="false">http://www.colt.net/?p=8885</guid>
<description><![CDATA[<p>The post <a rel="nofollow" href="http://www.colt.net/blog/2015/10/01/digital-transformation/">Digital Transformation</a> appeared first on <a rel="nofollow" href="http://www.colt.net">Colt</a></p>
]]></description>
<content:encoded><![CDATA[<div class="wistia_responsive_padding" style="padding: 56.25% 0 28px 0; position: relative;">