Skip to content

Instantly share code, notes, and snippets.

View xpersonas's full-sized avatar

Justin Neel xpersonas

  • Evansville, IN
View GitHub Profile
@xpersonas
xpersonas / cloudSettings
Created December 4, 2019 19:45
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-12-04T19:45:24.519Z","extensionVersion":"v3.4.3"}
[
{
"name": "analytics",
"color": "feab0a",
},
{
"name": "bug",
"color": "d73a4a",
},
{
{"lastUpload":"2019-12-04T19:41:17.855Z","extensionVersion":"v3.4.3"}

Job #

Describe the bug
A clear and concise description of what the bug is.

Steps To Reproduce

  1. URL:
  2. Click on '....'
  3. Scroll down to '....'
  4. See error
Structure: DRUPAL_FORM_ID|EMAIL:drupal_form_email_field|MAILCHIMP_MERGE_TAG:mailchimp_field_type:drupal_form_field
Example: warranty_form|EMAIL:field_email|FNAME:text:field_fname,LNAME:text:field_lname,MMERGE5:phone:field_phone,MMERGE6:birthday:field_birthday.
@xpersonas
xpersonas / services.yaml
Last active March 15, 2017 18:41
Redis on platform.sh - services.yaml
# .platform/services.yaml
rediscache:
type: redis:3.0
@xpersonas
xpersonas / .platform.app.yaml
Last active March 15, 2017 18:42
Redis on platform.sh - .platform.app.yaml
# .platform.app.yaml
runtime:
extensions:
- redis
relationships:
redis: "rediscache:redis"
@xpersonas
xpersonas / parameters_platform.php
Last active March 15, 2017 18:43
Redis on platform.sh - parameters_platform.php
<?php
# app/config/parameters_platform.php
$relationships = getenv("PLATFORM_RELATIONSHIPS");
if (!$relationships) {
return;
}
$relationships = json_decode(base64_decode($relationships), true);
@xpersonas
xpersonas / drupal-8-images-with-style.php
Last active October 10, 2016 19:31
Drupal 8 Images Rendered with Style
// https://kindrakevich.com/notes/drupal-8-render-images-image-style
// Find a derivative URI and URL:
$original_image = 'public://images/image.jpg';
use Drupal\image\Entity\ImageStyle;
$style = ImageStyle::load('thumbnail'); // Load the image style configuration entity.
$uri = $style->buildUri($original_image);
$url = $style->buildUrl($original_image);
// Create a derivative image programmatically:
$original_image = 'public://images/image.jpg';