Skip to content

Instantly share code, notes, and snippets.

View zakiya's full-sized avatar

zakiya zakiya

View GitHub Profile
name about title labels assignees
Proposal
Design system 01 - Propose a design system project or component
Proposal:
Process - New Component, Process - Proposal

Thanks for reaching out with your proposal for the Design System. Our design system team will review this component proposal as soon as we can.

@zakiya
zakiya / check_paragraph_usage.php
Last active February 2, 2021 00:34
Get a list of entities that reference a paragraph type.
_field_usage_check('event', 'entity_reference');
/**
* string $reference_type
* Example: 'node' or 'paragraph'
* string $referenced_entity_type
* Example: 'entity_reference' or 'entity_reference_revisions'
*
* Given the machine name of a paragraph, return/print the entities that reference it.
*/
<?php>
function myfunction($app) {
// ~~ Core.
// debug($app);
// dump($app);
// var_dump($app);
// ~~ Devel + kint library + settings
// dpr($app);
// kint($app);
@zakiya
zakiya / debug.twig
Created January 15, 2021 19:49
Debugging Twig in Drupal
{# ~ Core ~ #}
{# {{ dump() }} #}
{# {{ dump(page) }} #}
{# ~ Devel~ #}
{# {{ kint()}} #}
{# {{ kint(page)}} #}
{# {{ devel_dump(page) }} #}
{# {{ devel_breakpoint() }} #}
@zakiya
zakiya / localupdater.sh
Created September 9, 2020 01:02
Update local
#!/bin/bash
COLOR_RED="\033[0;31m"
COLOR_YELLOW="\033[0;33m"
COLOR_GREEN="\033[0;32m"
COLOR_OCHRE="\033[38;5;95m"
COLOR_BLUE="\033[0;34m"
COLOR_WHITE="\033[0;37m"
COLOR_RESET="\033[0m"
# To set a crontab for this script:
@zakiya
zakiya / contacts.js
Created April 20, 2020 18:53
Limit exposed filter options.
(function($, Drupal) {
'use strict';
Drupal.behaviors.viewContactContacts = {
attach: function(context, drupalSettings) {
// List of tids from pacificsource_preprocess_views_view__contact_contacts().
const $tids = drupalSettings.pacificsource.view_contact_contacts.contact_tids;
// Target the correct view.
@zakiya
zakiya / submit-scroll.js
Created January 28, 2020 18:46
Scroll to position of submit button so users can see the new content that's displayed below.
(function($, Drupal) {
"use strict";
Drupal.behaviors.submitscroll = {
attach: function(context) {
// Define button.
const $submitButton = $(".jcc-choice-section input[type=submit]");
// Send offset values to sessionStorage, then submit form.
$submitButton.click(function(e) {
#!/usr/bin/env bash
COLOR_RED="\033[0;31m"
COLOR_YELLOW="\033[0;33m"
COLOR_GREEN="\033[0;32m"
COLOR_OCHRE="\033[38;5;95m"
COLOR_BLUE="\033[0;34m"
COLOR_WHITE="\033[0;37m"
COLOR_RESET="\033[0m"
# function git_color {
<div> New Header! </div>
When you don't want to wait to feel better
<p>BeWellNow lets you talk with a doctor from the comfort of your own home or on-the-go. It's easy to use, free to enroll and the cost is just $49 per visit.&nbsp;</p>
<ul>
<li>Unlimited video visits with doctors from the comfort of your smartphone, tablet or computer</li>
<li>Peace of mind with a doctor "on call" 24/7 to provide quality care to you and your family</li>
<li>Prescriptions, referals, and more</li>
</ul>
<p>You can use BeWellNow any time, day or night. It's perfect when your doctor's office is closed; when you're too sick or busy to see someone in person; or even whenyou're traveling.</p>