Skip to content

Instantly share code, notes, and snippets.


Jim Birch thejimbirch

View GitHub Profile
thejimbirch /
Created Jan 12, 2022 — forked from claraj/
Fixing git submodule AKA git repo inside another git repo

Problem, and symptoms:

You experience one or more of these symptoms

  • you have code in a directory but it's not being pushed to GitHub. You just see an empty directory icon
  • you see this message when you add code to your git repository from the command prompt
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
View teachforall.org_home_2021-09-10_12-11-59.json
This file has been truncated, but you can view the full file.
"userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36",
"environment": {
"networkUserAgent": "Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4590.2 Mobile Safari/537.36 Chrome-Lighthouse",
"hostUserAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.63 Safari/537.36",
"benchmarkIndex": 1429.5,
"credits": {
"axe-core": "4.2.3"
thejimbirch / breadcrumb.html.twig
Created Apr 13, 2020
Add BreadcrumbList inline in Drupal 8+ in your theme's templates.
View breadcrumb.html.twig
* @file
* Theme override for a breadcrumb trail.
* Available variables:
* - breadcrumb: Breadcrumb trail items.
{% if breadcrumb %}
thejimbirch / metatag_example.php
Created Aug 19, 2019 — forked from mortenson/metatag_example.php
OR statements in metatags...
View metatag_example.php
* Implements hook_metatags_attachments_alter().
* This function allows you to define fallback tokens in case a field is empty.
* If all fallback values are empty, the tag will be empty.
* Example: [node:field_image:medium]||[node:field_legacy_image:medium]||/fallback.png
thejimbirch / contrib
Last active Jun 16, 2021 — forked from sean-e-dietrich/contrib
Contrib Command For Docksal
View contrib
if [[ -z "${NAME}" ]]; then
if [[ -d $NAME ]]; then


As a developer, I need to start with a story.

A few sentences describing the overall goals of the pull request's commits. What is the current behavior of the app? What is the updated/expected behavior with this PR? Include your acceptance critiera! If your tasks were well-written, you can probably copy/paste some of this.

Affected URL


View schema-wp-add-new-type-claim-review.php
<?php //* do not include php tag
add_filter( 'schema_wp_types', 'schema_wp_new_add_schema_type_claim_review' );
* Add ClaimReview to Schema Types options
* @since 1.0
function schema_wp_new_add_schema_type_7623456( $options ) {
thejimbirch / paragraph--xeno-hero.html.twig
Created Apr 23, 2017
Partial section of Xeno Hero Drupal 8 Paragraphs Template
View paragraph--xeno-hero.html.twig
{# Prints div with classes, & content w/o img/invert/overlay/parallax fields. #}
<div{{ attributes.addClass(classes).setAttribute('data-overlay', overlay_levels).setAttribute('data-speed', parallax_speeds) }}>
{% if content.xeno_background_image|render %}
<div class="paragraph--type--xeno-hero__image">
{{ content.xeno_background_image }}
{% endif %}
{{ content|without('xeno_background_image', 'xeno_invert', 'xeno_overlay', 'xeno_parallax') }}
thejimbirch / Gruntfile-bootstrap-3.js
Last active Dec 16, 2019
Bootstrap 3 and 4 Gruntfiles with copy functions to move and rename files into a Drupal or Wordpress theme. Replace SITENAME with your site or theme name.
View Gruntfile-bootstrap-3.js
* Bootstrap's Gruntfile
* Copyright 2013-2016 Twitter, Inc.
* Licensed under MIT (
module.exports = function (grunt) {
'use strict';
thejimbirch / paragraph--carousel.html.twig
Created Oct 21, 2016
Drupal 8 Template for Bootstrap Paragraphs customized for Carousel.
View paragraph--carousel.html.twig