Skip to content

Instantly share code, notes, and snippets.


arshad arshad

View GitHub Profile
arshad / custom-theme.js
Created Oct 29, 2020
Custom theme for Reflex
View custom-theme.js
import { merge } from "theme-ui"
import base from "@reflexjs/preset-base"
export default merge(base, {
colors: {
text: "#000",
background: "#fff",
primary: "#2a9d8f",
secondary: "#e76f51",
arshad / PurchasedPlanListBuilder.php
Created May 12, 2020
How to override the PurchasedPlanListBuilder for Apigee M10n
View PurchasedPlanListBuilder.php
// Place in `custom_module/src/Entity/ListBuilder/PurchasedPlanListBuilder.php`
namespace Drupal\custom_module\Entity\ListBuilder;
use Drupal\apigee_m10n\Entity\ListBuilder\PurchasedPlanListBuilder as ApigeePurchasedPlanListBuilder;
class PurchasedPlanListBuilder extends ApigeePurchasedPlanListBuilder {
View gatsby-podcast.mdx

Add podcast to your site

This recipe adds podcast support to your Gatsby site using @arshad/gatsby-theme-podcast-core.

Install NPM packages

<NPMPackage name="@arshad/gatsby-theme-podcast-core"

View episodes.js
import React from "react"
import { Link } from "gatsby"
import Image from "gatsby-image"
import Layout from "../../../components/layout"
import SEO from "../../../components/seo"
export const formatDuration = seconds => {
const minutes = Math.floor(seconds / 60)
const hours = Math.floor(seconds / (60 * 60))

Step 1: Add import-glob-loader:

$ npm i import-glob-loader -D

Step 3: Update webpack config:

 | Configuration
arshad /
Created Jul 2, 2018
Value module: |pick and |rename_keys example

Value module: |pick and |rename_keys example

Given the following component:

<div class="card">
  <div class="card-header">
    <h4>{{ title }}</h4>
  <div class="card-body">
arshad /
Last active May 12, 2017
How to add custom fonts to a Radix theme

1. Google Fonts

  1. Copy the @import url from
  2. Edit /scss/base/_variables.scss and add your @import url under // Typography.
  3. Update the $font-family variables.


// Typography
arshad /
Last active Feb 23, 2017
How to create a composer-based project on Pantheon.

How to create a composer-based project on Pantheon.

  1. Install Terminus: composer global require pantheon-systems/terminus.
  2. Head to your Pantheon dashboard, go to your Account and click on Machine Tokens.
  3. Create a new token and use it auth with Pantheon: terminus auth:login --machine-token=MACHINE-TOKEN
  4. Create a new site on Pantheon using terminus: terminus site:create name-of-site "Name of Site" 35b0e365-a191-4c70-adbe-9d02d01343f3. 35b0e365-a191-4c70-adbe-9d02d01343f3 is the uuid of the Drops 8 Composer upstream. You can see a list of upstream by running terminus upstream:list
  5. Once the site is created, you can head to and continue with setup.
  6. Cloning your site on your local should give you a composer-based template.
arshad / SerializerWithPager.php
Created Dec 20, 2016
A views Serializer plugin for Drupal 8 with pager
View SerializerWithPager.php
namespace Drupal\MODULE_NAME\Plugin\views\style;
use Drupal\rest\Plugin\views\style\Serializer;
* The style plugin for serialized output formats with pager.
* @ingroup views_style_plugins
arshad /
Created Dec 14, 2016
# Local development services.
# To activate this feature, follow the instructions at the top of the
# 'example.settings.local.php' file, which sits next to this file.
class: Drupal\Core\Cache\NullBackendFactory
debug: true