Skip to content

Instantly share code, notes, and snippets.

View paulsheldrake's full-sized avatar

Paul Sheldrake paulsheldrake

  • Vancouver, Canada
View GitHub Profile
# ----------------------------------------------------------------------
# | 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 <paul.sheldrake@gmail.com>
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 <paul.sheldrake@gmail.com>
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;
@paulsheldrake
paulsheldrake / install_wp_cli.sh
Last active October 24, 2017 18:25
Install WP-CLI
#!/bin/bash
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
cd ~/
wget https://raw.githubusercontent.com/wp-cli/wp-cli/master/utils/wp-completion.bash
echo 'source /home/vagrant/wp-completion.bash' >> ~/.bash_profile
source ~/.bash_profile
#!/bin/bash
# Generate the new dump file path
now=$(date +"%Y_%m_%d")
path="/home/468e/backup/mises.prod.$now.sql"
path_gz="/home/468e/backup/mises.prod.$now.sql.gz"
# Export the DB, remove old versions of the same file
rm -f $path_gz
cd /var/www/prod.mises.org/htdocs/;
/usr/local/bin/drush sql-dump --gzip --result-file="$path";
@paulsheldrake
paulsheldrake / views-view-unformatted.html.twig
Last active August 24, 2023 10:35
Field level data for Views rows in Drupal 8.
{#
/**
* @file
* Theme override to display a view of unformatted rows.
*
* Available variables:
* - title: The title of this group of rows. May be empty.
* - rows: A list of the view's row items.
* - attributes: The row's HTML attributes.
* - content: The row's content.