Skip to content

Instantly share code, notes, and snippets.

View paulsheldrake's full-sized avatar

Paul Sheldrake paulsheldrake

  • Vancouver, Canada
View GitHub Profile
@paulsheldrake
paulsheldrake / jvectormap_parse_svg.php
Last active May 15, 2020 12:54
Parse an SVG to get data for jvectormap js file
This file has been truncated, but you can view the full file.
<?php
$amchart_map_svg = '<?xml version="1.0" encoding="utf-8"?>
<!-- (c) ammap.com | SVG map of World - High -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:amcharts="http://amcharts.com/ammap" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
<defs>
<style type="text/css">
.land
{
fill: #CCCCCC;
fill-opacity: 1;
Index: webform.module
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- webform.module (revision cd7b2888fc53da871b69eb73fa23f6df5e252016)
+++ webform.module (date 1585660554035)
@@ -327,16 +327,16 @@
'file' => 'includes/webform.report.inc',
'type' => MENU_CALLBACK,
{"userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/74.0.3729.169 Safari/537.36","environment":{"networkUserAgent":"Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3694.0 Mobile Safari/537.36 Chrome-Lighthouse","hostUserAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/74.0.3729.169 Safari/537.36","benchmarkIndex":1228},"lighthouseVersion":"5.0.0","fetchTime":"2019-08-13T13:14:05.525Z","requestedUrl":"http://pr-85-kanopi-2019.pantheonsite.io/","finalUrl":"https://pr-85-kanopi-2019.pantheonsite.io/","runWarnings":[],"audits":{"is-on-https":{"id":"is-on-https","title":"Does not use HTTPS","description":"All sites should be protected with HTTPS, even ones that don't handle sensitive data. HTTPS prevents intruders from tampering with or passively listening in on the communications between your app and your users, and is a prerequisite for HTTP/2 and many new web p
# ----------------------------------------------------------------------
# | Media types |
# ----------------------------------------------------------------------
# Serve resources with the proper media types (f.k.a. MIME types).
#
# https://www.iana.org/assignments/media-types/media-types.xhtml
# https://httpd.apache.org/docs/current/mod/mod_mime.html#addtype
<IfModule mod_mime.c>
Create challenge: https://app.stridekick.com/challenge/
Invites: https://gist.github.com/paulsheldrake/6f594855dec929f831bf93dff3693c2e
Update the challenge ID at the end before coping and pasting
/remind #fitness-n-health You stepping? https://stridekick.com/app#/segments/leaderboard?challenge_id=169468 every weekday 9am
@paulsheldrake
paulsheldrake / kantu-user_register.json
Created February 2, 2019 01:01
Basic setup for Kantu user creation form.
{
"Name": "WT - user create",
"CreationDate": "2019-2-1",
"Commands": [
{
"Command": "deleteAllCookies",
"Target": "",
"Value": ""
},
diff --git a/src/Plugin/Field/FieldFormatter/PdfDefault.php b/src/Plugin/Field/FieldFormatter/PdfDefault.php
index 1995201..7dbfb8d 100755
--- a/src/Plugin/Field/FieldFormatter/PdfDefault.php
+++ b/src/Plugin/Field/FieldFormatter/PdfDefault.php
@@ -5,8 +5,8 @@ namespace Drupal\pdf\Plugin\Field\FieldFormatter;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\Field\FormatterBase;
use Drupal\Core\Field\FieldItemListInterface;
+use Drupal\Core\Site\Settings;
use Drupal\Core\Form\FormStateInterface;
From 3a65c8056d139f1f252a841505de50f5066c604e Mon Sep 17 00:00:00 2001
From: Paul Sheldrake <[email protected]>
Date: Fri, 21 Sep 2018 17:11:26 -0700
Subject: [PATCH] add bootstrap renderer for quicktabs
---
.gitignore | 2 +
quicktabs.module | 38 ++++++---
src/Plugin/TabRenderer/BootstrapTabs.php | 128 +++++++++++++++++++++++++++++++
templates/quicktabs-bootstrap.html.twig | 18 +++++
From 879c47e6c03216b03b86bbe8c30ed190b44ec943 Mon Sep 17 00:00:00 2001
From: Paul Sheldrake <[email protected]>
Date: Tue, 4 Sep 2018 11:08:09 -0700
Subject: [PATCH] re-roll patch for for settings and tab title
---
.gitignore | 1 +
src/Plugin/views/style/ViewsBootstrapTab.php | 30 ++++++++++++++++---
templates/views-bootstrap-tab.html.twig | 12 +++++++-
views_bootstrap.theme.inc | 44 ++++++++++++++++++++++++++--
diff --git a/acl.admin.inc b/acl.admin.inc
index 41b3822..4f0e5ed 100644
--- a/acl.admin.inc
+++ b/acl.admin.inc
@@ -8,6 +8,7 @@
use Drupal\Component\Utility\Html;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Database\Database;
+use Drupal\Core\Entity\Element\EntityAutocomplete;