Skip to content

Instantly share code, notes, and snippets.

View andybroomfield's full-sized avatar

Andy Broomfield andybroomfield

View GitHub Profile
@andybroomfield
andybroomfield / tasty_backend_check_manage_view_exists.patch
Created January 22, 2020 12:01
Patch for skiping over the tasty backend duplicate view if main tb manage content view does not exist yet (Fix install site from config)
diff --git a/src/TastyBackendManager.php b/src/TastyBackendManager.php
index 28bb212..a06c4c1 100644
--- a/src/TastyBackendManager.php
+++ b/src/TastyBackendManager.php
@@ -54,28 +54,31 @@ class TastyBackendManager extends SystemManager {
'plugin_id' => 'bundle',
'group' => 1,
];
-
+
@andybroomfield
andybroomfield / anchor_link_support_3015301-5--for-non-dev.patch
Last active September 17, 2019 14:44
View ajax history (D8) patch for fragment support (reroll)
@andybroomfield
andybroomfield / 2907094_tabs_field_group_support.patch
Created May 19, 2019 01:02
Patch for Drupal Paragrams with field group horizontal tabs
diff --git a/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php b/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php
index ce8d108..2d9bda9 100644
--- a/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php
+++ b/src/Plugin/Field/FieldWidget/InlineParagraphsWidget.php
@@ -643,7 +643,7 @@ class InlineParagraphsWidget extends WidgetBase {
];
field_group_attach_groups($element['subform'], $context);
- $element['subform']['#pre_render'][] = 'field_group_form_pre_render';
+ $element['subform']['#process'][] = 'field_group_form_process';
@andybroomfield
andybroomfield / metaweather.php
Last active December 2, 2018 11:09
Metaweather.com API proxy to implement cache and CORS headers
<?php
define ('API_URI_BASE', 'https://www.metaweather.com/api/');
define ('CACHE_DIR', 'metaweather-cache');
define ('CACHE_TIME', 3600);
// Create Cache Directory
$cache_name = sha1($_SERVER['REQUEST_URI']);
if (!is_dir(CACHE_DIR)) {
@andybroomfield
andybroomfield / s3.php
Created May 4, 2018 10:12
Patching Codeigniter s3 library to work with AWS4-HMAC-SHA256
<?php defined('BASEPATH') OR exit('No direct script access allowed');
/**
* $Id: S3.php 47 2009-07-20 01:25:40Z don.schonknecht $
*
* Copyright (c) 2008, Donovan Schönknecht. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*

Keybase proof

I hereby claim:

  • I am andybroomfield on github.
  • I am andybroomfield (https://keybase.io/andybroomfield) on keybase.
  • I have a public key ASC0HjMs_5yp3Vo7d7FLlmaEUyrqqrvk5RGdVHQoZIDcHgo

To claim this, I am signing this object: