Skip to content

Instantly share code, notes, and snippets.

Avatar
🇺🇦

Ron Northcutt rlnorthcutt

🇺🇦
  • Appsmith
  • Austin, TX
View GitHub Profile
View cdf-export.php
<?php
use Drupal\Component\Utility\NestedArray;
if (empty($extra[0])) {
throw new \Exception("Please supply the id of the node you want to export to CDF.");
}
$node = \Drupal::entityTypeManager()->getStorage('node')->load($extra[0]);
$wrapper = new \Drupal\depcalc\DependentEntityWrapper($node);
View gist:6c08a436a2c75f7126573245ce20a2bb
Easily create a modal link in Drupal
p><a class="use-ajax" data-dialog-options="{&quot;width&quot;:800}" data-dialog-type="modal" href="/node/2">See node 2</a></p>
source: https://befused.com/drupal/modal
@rlnorthcutt
rlnorthcutt / gist:dff8e7df2d6336089cd2234b0109e1a5
Created Jul 9, 2018
Drupal 8 Media Revision Page - Config
View gist:dff8e7df2d6336089cd2234b0109e1a5
uuid: f9c22d2e-c285-4fb9-b5a0-5dc0e492248e
langcode: en
status: true
dependencies:
module:
- media
- user
id: media_revisions
label: 'Media revisions'
module: views
View gist:c5d2618eaa4b9dd1082adcd3f3ccc654
Verifying my Blockstack ID is secured with the address 12B9JABVzJob3JLcgAkp1KaEpJzqrjdLiE https://explorer.blockstack.org/address/12B9JABVzJob3JLcgAkp1KaEpJzqrjdLiE
View url_from_alias.sh
#!/bin/bash
skipped=()
# Ask user which file to use for aliases, or if to run it straight
echo "Which file contains the list of the sites that you want URLs for?"
read alias_command
if test -f $alias_command; then
oldIFS="$IFS"
@rlnorthcutt
rlnorthcutt / restws_check.sh
Created Jul 14, 2016
These two shell scripts work to update your sites that are running an insecure version of RestWS. It should work for any Drush enabled system, but is created for the Acquia Cloud.
View restws_check.sh
#!/bin/bash
# Setup array variables
d8_sites=()
d7_sites=()
d7_restws=()
error_sites=()
# Ask user which file to use for aliases, or if to run it straight
echo "Which file contains the list of aliases to check?"
View fieldable-panels-pane--promo-block.tpl.php
<!-- No PHP in the template, even though it has the PHP extension on the file. -->
<div class={{ classes }} pod">
<div class="pod--inner">
<h3>{{ title }}</h3>
{{ image }}
<p>{{ promo }}</p>
{{ link }}
<p><small>{{ terms }}</small></p>
</div>
</div>
View Sprout Make file test
api = 2
core = 7.x
projects[] = "drupal"
projects[sprout][type] = profile
projects[sprout][download][type] = "git"
projects[sprout][download][url] = "http://git.drupal.org/project/sprout.git"
View keybase.md

Keybase proof

I hereby claim:

  • I am rlnorthcutt on github.
  • I am rlnorthcutt (https://keybase.io/rlnorthcutt) on keybase.
  • I have a public key whose fingerprint is EC19 9FA3 4BB6 741D EE96 8EC5 1BFE 51B3 A214 5B36

To claim this, I am signing this object:

View gist:1e3a2fb5a5770ec338fb
Verifying that +rlnorthcutt is my openname (Bitcoin username). https://onename.io/rlnorthcutt