Skip to content

Instantly share code, notes, and snippets.

View morvans's full-sized avatar

garphy / Simon morvans

View GitHub Profile
diff --git a/modules/jsonapi_defaults/config/schema/jsonapi_defaults.schema.yml b/modules/jsonapi_defaults/config/schema/jsonapi_defaults.schema.yml
index 8d299f3080fa7a84b94a31a6df34534db2b96a4e..e837f014af6d5c9d899404ab3630efcd99ce05c5 100644
--- a/modules/jsonapi_defaults/config/schema/jsonapi_defaults.schema.yml
+++ b/modules/jsonapi_defaults/config/schema/jsonapi_defaults.schema.yml
@@ -14,6 +14,12 @@ jsonapi_extras.jsonapi_resource_config.*.third_party.jsonapi_defaults:
sequence:
type: string
label: 'Key and value'
+ default_sorting:
+ type: sequence

Keybase proof

I hereby claim:

  • I am morvans on github.
  • I am garphy (https://keybase.io/garphy) on keybase.
  • I have a public key ASAPam5Y7Jc9vsXNsl9OlqHK7kplnRQR345tI4BJcJO31go

To claim this, I am signing this object:

<?php
$options['uri'] = getenv('DRUPAL_URI');
$options['sites-subdir'] = 'default';
$options['variables']['language_default'] = (object) array(
'language' => 'en',
'name' => 'English',
'native' => 'English',
'direction' => '0',
@morvans
morvans / snipcart_validate_request.php
Created March 24, 2017 15:01
Snipcart request validation in Drupal module
function snipcart_validate_request(){
if(variable_get('snipcart_disable_request_validation', FALSE)){
return TRUE;
}
$snipcartAPIKey = variable_get('snipcart_api_key', '');
$snipcartRequestToken = $_SERVER['HTTP_X_SNIPCART_REQUESTTOKEN'];
@morvans
morvans / adl
Created March 16, 2016 14:36
Adobe AIR debug launcher adl.exe linux wrapper
#!/bin/bash
set -xeufo pipefail
LOCALDIR=`dirname $0`
function convert_argv {
argv=""
while (($#)); do
if [ -e $1 ] ; then
@morvans
morvans / angular-snipcart.js
Created February 18, 2016 09:04
Prevent Angular from messing with Snipcart #hashes
$rootScope.$on('$locationChangeStart', function (event, url) {
if (url.indexOf('#!/') >= 0) {
event.preventDefault();
}
if (url.indexOf('#!%2F') >= 0) {
event.preventDefault();
}
});
libraries[fpdi][download][url] = "http://www.setasign.de/supra/kon2_dl/60111/FPDI-1.4.4.zip"
libraries[fpdi][download][type] = "file"
libraries[fpdi][directory_name] = "fpdi"
libraries[fpdi][type] = "library"
libraries[fpdi_tpl][download][url] = "http://www.setasign.com/supra/kon2_dl/63411/FPDF_TPL-1.2.3.zip"
libraries[fpdi_tpl][download][type] = "file"
libraries[fpdi_tpl][directory_name] = "fpdi"
libraries[fpdi_tpl][overwrite] = TRUE
libraries[fpdi_tpl][type] = "library"